aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgbuild.c
diff options
context:
space:
mode:
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,