diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-11-03 11:34:34 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-11-03 11:34:34 +0100 |
commit | 87c20fe7623b31c72d31b015254fd7f7964f2ead (patch) | |
tree | ae4c8e41d3e76010b164935427be7eb77a66ab6d /gcc/tree-ssa-pre.c | |
parent | ca818bd905c80e424dbc4074bf6f25c6e5ccd897 (diff) | |
download | gcc-87c20fe7623b31c72d31b015254fd7f7964f2ead.zip gcc-87c20fe7623b31c72d31b015254fd7f7964f2ead.tar.gz gcc-87c20fe7623b31c72d31b015254fd7f7964f2ead.tar.bz2 |
re PR tree-optimization/46165 (ICE: verify_flow_info failed when casting-out attribute noreturn with -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce)
PR tree-optimization/46165
* tree-ssa-pre.c (eliminate): Return TODO_cleanup_cfg if changing
a normal call into noreturn call.
* gcc.dg/pr46165.c: New test.
From-SVN: r166236
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 8f91bd6..fda9437 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -4364,6 +4364,7 @@ eliminate (void) { bool can_make_abnormal_goto = stmt_can_make_abnormal_goto (stmt); + bool was_noreturn = gimple_call_noreturn_p (stmt); if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -4376,6 +4377,11 @@ eliminate (void) gimple_call_set_fn (stmt, fn); update_stmt (stmt); + /* When changing a call into a noreturn call, cfg cleanup + is needed to fix up the noreturn call. */ + if (!was_noreturn && gimple_call_noreturn_p (stmt)) + todo |= TODO_cleanup_cfg; + /* If we removed EH side-effects from the statement, clean its EH information. */ if (maybe_clean_or_replace_eh_stmt (stmt, stmt)) |