aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-05-27 14:56:30 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-05-27 12:56:30 +0000
commitbaf8706c69b80fbf100bdb854d96d1d19bb1ad52 (patch)
tree53b2a7fde2f1ab5dc99de3cf0d6cb7541ae5fb7b /gcc/cfgbuild.c
parent63645982e7f5d9d95f152052431db81c2f119a15 (diff)
downloadgcc-baf8706c69b80fbf100bdb854d96d1d19bb1ad52.zip
gcc-baf8706c69b80fbf100bdb854d96d1d19bb1ad52.tar.gz
gcc-baf8706c69b80fbf100bdb854d96d1d19bb1ad52.tar.bz2
* cfgbuild.c (control_flow_insn_p): Notice noreturn call
From-SVN: r82321
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r--gcc/cfgbuild.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index 3e9a36c..e184479 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -108,6 +108,12 @@ control_flow_insn_p (rtx insn)
&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
case CALL_INSN:
+ /* Noreturn and sibling call instructions terminate the basic blocks
+ (but only if they happen unconditionally). */
+ if ((SIBLING_CALL_P (insn)
+ || find_reg_note (insn, REG_NORETURN, 0))
+ && GET_CODE (PATTERN (insn)) != COND_EXEC)
+ return true;
/* Call insn may return to the nonlocal goto handler. */
return ((nonlocal_goto_handler_labels
&& (0 == (note = find_reg_note (insn, REG_EH_REGION,