diff options
author | Martin Liska <mliska@suse.cz> | 2016-10-13 12:06:35 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-10-13 10:06:35 +0000 |
commit | 27947670631d8a44fd8c2984da601154b614fa81 (patch) | |
tree | 0329ecc6fcb3f9d33cdd52bdf732c067b11528d4 /gcc/tree-ssa-tail-merge.c | |
parent | 3e0c9334e9f766749d1661745b320860ae4827ef (diff) | |
download | gcc-27947670631d8a44fd8c2984da601154b614fa81.zip gcc-27947670631d8a44fd8c2984da601154b614fa81.tar.gz gcc-27947670631d8a44fd8c2984da601154b614fa81.tar.bz2 |
Do not merge BBs with a different EH landing pads (PR
PR tree-optimization/77943
* g++.dg/tree-ssa/pr77943.C: New test.
PR tree-optimization/77943
* tree-ssa-tail-merge.c (merge_stmts_p): Do not merge BBs with
a different EH landing pads.
From-SVN: r241090
Diffstat (limited to 'gcc/tree-ssa-tail-merge.c')
-rw-r--r-- | gcc/tree-ssa-tail-merge.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index 5e815ec..c292ee7 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -204,6 +204,7 @@ along with GCC; see the file COPYING3. If not see #include "params.h" #include "tree-ssa-sccvn.h" #include "cfgloop.h" +#include "tree-eh.h" /* Describes a group of bbs with the same successors. The successor bbs are cached in succs, and the successor edge flags are cached in succ_flags. @@ -1222,6 +1223,10 @@ merge_stmts_p (gimple *stmt1, gimple *stmt2) if (is_tm_ending (stmt1)) return false; + /* Verify EH landing pads. */ + if (lookup_stmt_eh_lp_fn (cfun, stmt1) != lookup_stmt_eh_lp_fn (cfun, stmt2)) + return false; + if (is_gimple_call (stmt1) && gimple_call_internal_p (stmt1)) switch (gimple_call_internal_fn (stmt1)) |