-2006-09-28 Eric Botcazou <ebotcazou@adacore.com>
+2006-09-30 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR rtl-optimization/28096
+ * ifcvt.c (check_cond_move_block): Return FALSE if the source of an
+ assignment has already been used as a destination earlier in the block.
+
+2006-09-29 Eric Botcazou <ebotcazou@adacore.com>
* builtins.c (expand_builtin_setjmp): Delete.
(expand_builtin) <BUILT_IN_SETJMP>: Mark as unreachable.
src = SET_SRC (set);
if (!REG_P (dest)
|| (SMALL_REGISTER_CLASSES && HARD_REGISTER_P (dest)))
- return false;
+ return FALSE;
if (!CONSTANT_P (src) && !register_operand (src, VOIDmode))
return FALSE;
if (may_trap_p (src) || may_trap_p (dest))
return FALSE;
+ /* Don't try to handle this if the source register was
+ modified earlier in the block. */
+ if ((REG_P (src)
+ && vals[REGNO (src)] != NULL)
+ || (GET_CODE (src) == SUBREG && REG_P (SUBREG_REG (src))
+ && vals[REGNO (SUBREG_REG (src))] != NULL))
+ return FALSE;
+
/* Don't try to handle this if the destination register was
modified earlier in the block. */
if (vals[REGNO (dest)] != NULL)
+2006-09-30 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * gcc.c-torture/execute/20060930-1.c: New test.
+
2006-09-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/18791
* gfortran.dg/nearest_1.f90: Add -ffloat-store to defeat extra
precision on some archs.
-2006-09-28 Eric Botcazou <ebotcazou@adacore.com>
+2006-09-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/non-local-goto-1.c: New test.
* gcc.dg/non-local-goto-2.c: Likewise.
--- /dev/null
+/* PR rtl-optimization/28096 */
+/* Origin: Jan Stein <jan@gatespacetelematics.com> */
+
+extern void abort (void);
+
+int bar (int, int) __attribute__((noinline));
+int bar (int a, int b)
+{
+ if (b != 1)
+ abort ();
+}
+
+void foo(int, int) __attribute__((noinline));
+void foo (int e, int n)
+{
+ int i, bb2, bb5;
+
+ if (e > 0)
+ e = -e;
+
+ for (i = 0; i < n; i++)
+ {
+ if (e >= 0)
+ {
+ bb2 = 0;
+ bb5 = 0;
+ }
+ else
+ {
+ bb5 = -e;
+ bb2 = bb5;
+ }
+
+ bar (bb5, bb2);
+ }
+}
+
+int main(void)
+{
+ foo (1, 1);
+ return 0;
+}