* combine.c (distribute_notes): When invoking SET_INSN_DELETED on i2,
set it to NULL_RTX afterwards.
* emit-rtl.c (set_insn_deleted): Fix formatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142388
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-12-03 Eric Botcazou <ebotcazou@adacore.com>
+ Jakub Jelinek <jakub@redhat.com>
+ Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR rtl-optimization/38281
+ * combine.c (distribute_notes): When invoking SET_INSN_DELETED on i2,
+ set it to NULL_RTX afterwards.
+
+ * emit-rtl.c (set_insn_deleted): Fix formatting.
+
2008-12-02 Richard Sandiford <rdsandiford@googlemail.com>
* config/mips/mips.c (mips_expand_builtin): Fix the mode of the
distribute_links (LOG_LINKS (tem));
SET_INSN_DELETED (tem);
+ if (tem == i2)
+ i2 = NULL_RTX;
#ifdef HAVE_cc0
/* Delete the setter too. */
distribute_links (LOG_LINKS (cc0_setter));
SET_INSN_DELETED (cc0_setter);
+ if (cc0_setter == i2)
+ i2 = NULL_RTX;
}
#endif
}
/* Replace insn with an deleted instruction note. */
-void set_insn_deleted (rtx insn)
+void
+set_insn_deleted (rtx insn)
{
df_insn_delete (BLOCK_FOR_INSN (insn), INSN_UID (insn));
PUT_CODE (insn, NOTE);
+2008-12-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/compile/20081203-1.c: New test.
+
2008-12-02 Jason Merrill <jason@redhat.com>
PR c++/35782, c++/37860
--- /dev/null
+/* PR rtl-optimization/38281 */
+/* Reporter: John Regehr <regehr@cs.utah.edu> */
+/* Testcase by Jakub Jelinek <jakub@redhat.com> */
+
+inline unsigned short
+foo (unsigned short x, unsigned short y)
+{
+ if (y == 0)
+ return x;
+ return x / y;
+}
+
+unsigned short a, b, c;
+
+extern int baz (int, int);
+
+void
+bar (void)
+{
+ int d = 0x3D75D162;
+ a = foo (b > d, baz (0, 1));
+ for (c = 0; c; c = 1)
+ ;
+}