patches/gcc/3.4.5/pr15068-fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
See http://gcc.gnu.org/PR15068
yann@1
     2
yann@1
     3
Fixes error
yann@1
     4
yann@1
     5
../sysdeps/generic/s_fmax.c: In function `__fmax':
yann@1
     6
../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
yann@1
     7
Please submit a full bug report,
yann@1
     8
with preprocessed source if appropriate.
yann@1
     9
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
yann@1
    10
make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
yann@1
    11
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
yann@1
    12
make[1]: *** [math/others] Error 2
yann@1
    13
make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
yann@1
    14
make: *** [all] Error 2
yann@1
    15
yann@1
    16
[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
yann@1
    17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
yann@1
    18
yann@1
    19
--- gcc-3.4.1/gcc/flow.c.old	2004-02-27 19:39:19.000000000 -0800
yann@1
    20
+++ gcc-3.4.1/gcc/flow.c	2004-08-26 07:29:46.000000000 -0700
yann@1
    21
@@ -1878,6 +1878,7 @@
yann@1
    22
 	  rtx set_src = SET_SRC (pc_set (BB_END (bb)));
yann@1
    23
 	  rtx cond_true = XEXP (set_src, 0);
yann@1
    24
 	  rtx reg = XEXP (cond_true, 0);
yann@1
    25
+ 	  enum rtx_code inv_cond;
yann@1
    26
 
yann@1
    27
 	  if (GET_CODE (reg) == SUBREG)
yann@1
    28
 	    reg = SUBREG_REG (reg);
yann@1
    29
@@ -1886,11 +1887,13 @@
yann@1
    30
 	     in the form of a comparison of a register against zero.  
yann@1
    31
 	     If the condition is more complex than that, then it is safe
yann@1
    32
 	     not to record any information.  */
yann@1
    33
-	  if (GET_CODE (reg) == REG
yann@1
    34
+ 	  inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
yann@1
    35
+ 	  if (inv_cond != UNKNOWN
yann@1
    36
+	      && GET_CODE (reg) == REG
yann@1
    37
 	      && XEXP (cond_true, 1) == const0_rtx)
yann@1
    38
 	    {
yann@1
    39
 	      rtx cond_false
yann@1
    40
-		= gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
yann@1
    41
+		= gen_rtx_fmt_ee (inv_cond,
yann@1
    42
 				  GET_MODE (cond_true), XEXP (cond_true, 0),
yann@1
    43
 				  XEXP (cond_true, 1));
yann@1
    44
 	      if (GET_CODE (XEXP (set_src, 1)) == PC)