summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 98d6ba448fa..64bdc92e681 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3335,7 +3335,9 @@ verify_gimple_call (gcall *stmt)
return true;
}
- if (gimple_call_lhs (stmt) && gimple_call_noreturn_p (stmt))
+ if (gimple_call_ctrl_altering_p (stmt)
+ && gimple_call_lhs (stmt)
+ && gimple_call_noreturn_p (stmt))
{
error ("LHS in noreturn call");
return true;