]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/13394 (noreturn attribute ignored on recursive invokation)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Tue, 23 Dec 2003 06:28:37 +0000 (07:28 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 23 Dec 2003 06:28:37 +0000 (06:28 +0000)
PR optimization/13394
* toplev.c (rest_of_compilation): Move call to
check_function_return_warnings right after the sibcall
optimization pass.

From-SVN: r74964

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/toplev.c

index 56d1d0868348768dea602153c65075d1b0379700..68fbe4834ad885421ace92f51f0d90d3b685832b 100644 (file)
@@ -1,3 +1,10 @@
+2003-12-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR optimization/13394
+       * toplev.c (rest_of_compilation): Move call to
+       check_function_return_warnings right after the sibcall
+       optimization pass.
+
 2003-12-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR c/13382
index 182b40b05f48185e8e613c7e0d9d16832480350b..24cf462da58c1a609158184cdedae47e776acc42 100644 (file)
@@ -1,3 +1,7 @@
+2003-12-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * gcc.dg/noreturn-7.c: New test.
+
 2003-12-23  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/null-pointer-1.c: New test.
index adccdc40361c21cabb9ef4a3292123ac689930d0..128eee0b347bb5294a1ebfd621db5e24566dacd8 100644 (file)
@@ -2583,10 +2583,6 @@ rest_of_compilation (decl)
 
   delete_unreachable_blocks ();
 
-  /* We have to issue these warnings now already, because CFG cleanups
-     further down may destroy the required information.  */
-  check_function_return_warnings ();
-
   /* Turn NOTE_INSN_PREDICTIONs into branch predictions.  */
   if (flag_guess_branch_prob)
     {
@@ -2620,6 +2616,15 @@ rest_of_compilation (decl)
          delete_insn (insn);
     }
   close_dump_file (DFI_sibling, print_rtl, get_insns ());
+
+  /* We have to issue these warnings now already, because CFG cleanups
+     further down may destroy the required information.  However, this
+     must be done after the sibcall optimization pass because the barrier
+     emitted for noreturn calls that are candidate for the optimization
+     is folded into the CALL_PLACEHOLDER until after this pass, so the
+     CFG is inaccurate.  */
+  check_function_return_warnings ();
+
   timevar_pop (TV_JUMP);
 
   scope_to_insns_initialize ();