1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/3.4.1/pr15068-fix.patch Sat Jun 16 18:01:59 2007 +0000
1.3 @@ -0,0 +1,44 @@
1.4 +See http://gcc.gnu.org/PR15068
1.5 +
1.6 +Fixes error
1.7 +
1.8 +../sysdeps/generic/s_fmax.c: In function `__fmax':
1.9 +../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
1.10 +Please submit a full bug report,
1.11 +with preprocessed source if appropriate.
1.12 +See <URL:http://gcc.gnu.org/bugs.html> for instructions.
1.13 +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
1.14 +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'
1.15 +make[1]: *** [math/others] Error 2
1.16 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
1.17 +make: *** [all] Error 2
1.18 +
1.19 +[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
1.20 +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 ]
1.21 +
1.22 +--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
1.23 ++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
1.24 +@@ -1878,6 +1878,7 @@
1.25 + rtx set_src = SET_SRC (pc_set (BB_END (bb)));
1.26 + rtx cond_true = XEXP (set_src, 0);
1.27 + rtx reg = XEXP (cond_true, 0);
1.28 ++ enum rtx_code inv_cond;
1.29 +
1.30 + if (GET_CODE (reg) == SUBREG)
1.31 + reg = SUBREG_REG (reg);
1.32 +@@ -1886,11 +1887,13 @@
1.33 + in the form of a comparison of a register against zero.
1.34 + If the condition is more complex than that, then it is safe
1.35 + not to record any information. */
1.36 +- if (GET_CODE (reg) == REG
1.37 ++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
1.38 ++ if (inv_cond != UNKNOWN
1.39 ++ && GET_CODE (reg) == REG
1.40 + && XEXP (cond_true, 1) == const0_rtx)
1.41 + {
1.42 + rtx cond_false
1.43 +- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
1.44 ++ = gen_rtx_fmt_ee (inv_cond,
1.45 + GET_MODE (cond_true), XEXP (cond_true, 0),
1.46 + XEXP (cond_true, 1));
1.47 + if (GET_CODE (XEXP (set_src, 1)) == PC)