* dce.c (deletable_insn_p): Return true for const or pure calls again.
* except.c (insn_could_throw_p): Return false if !flag_exceptions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160507
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/42461
+ * dce.c (deletable_insn_p): Return true for const or pure calls again.
+ * except.c (insn_could_throw_p): Return false if !flag_exceptions.
+
2010-06-09 Jan Hubicka <jh@suse.cz>
* bitmap.c (bitmap_and): Walk array forward.
rtx body, x;
int i;
- /* Don't delete jumps, notes and the like. */
- if (!NONJUMP_INSN_P (insn))
- return false;
-
- /* Don't delete insns that can throw. */
- if (!insn_nothrow_p (insn))
- return false;
-
if (CALL_P (insn)
/* We cannot delete calls inside of the recursive dce because
this may cause basic blocks to be deleted and this messes up
&& !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)))
return find_call_stack_args (insn, false, fast, arg_stores);
+ /* Don't delete jumps, notes and the like. */
+ if (!NONJUMP_INSN_P (insn))
+ return false;
+
+ /* Don't delete insns that can throw. */
+ if (!insn_nothrow_p (insn))
+ return false;
+
body = PATTERN (insn);
switch (GET_CODE (body))
{
bool
insn_could_throw_p (const_rtx insn)
{
+ if (!flag_exceptions)
+ return false;
if (CALL_P (insn))
return true;
if (INSN_P (insn) && cfun->can_throw_non_call_exceptions)
+2010-06-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr42461.c: New test.
+
2010-06-09 Daniel Franke <franke.daniel@gmail.com>
- PR fortran/44347
- * gfortran.dg/selected_real_kind_1.f90: New.
+ PR fortran/44347
+ * gfortran.dg/selected_real_kind_1.f90: New.
2010-06-09 Daniel Franke <franke.daniel@gmail.com>
--- /dev/null
+/* PR rtl-optimization/42461 */
+/* Reported by Patrick Pelissier <patrick.pelissier@gmail.com> */
+
+/* { dg-do link } */
+/* { dg-options "-O" } */
+
+extern int link_failure (int) __attribute__ ((pure));
+
+int main (void)
+{
+ if (link_failure (0) < 1)
+ __builtin_unreachable ();
+ return 0;
+}