From: Eric Botcazou Date: Tue, 23 Dec 2003 06:28:37 +0000 (+0100) Subject: re PR rtl-optimization/13394 (noreturn attribute ignored on recursive invokation) X-Git-Tag: releases/gcc-3.3.3~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0a131ab3527064835e570f470fec44ab4ace659;p=thirdparty%2Fgcc.git re PR rtl-optimization/13394 (noreturn attribute ignored on recursive invokation) PR optimization/13394 * toplev.c (rest_of_compilation): Move call to check_function_return_warnings right after the sibcall optimization pass. From-SVN: r74964 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56d1d0868348..68fbe4834ad8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-12-23 Eric Botcazou + + 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 PR c/13382 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 182b40b05f48..24cf462da58c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-12-23 Eric Botcazou + + * gcc.dg/noreturn-7.c: New test. + 2003-12-23 Eric Botcazou * gcc.dg/null-pointer-1.c: New test. diff --git a/gcc/toplev.c b/gcc/toplev.c index adccdc40361c..128eee0b347b 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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 ();