summaryrefslogtreecommitdiff
path: root/gcc/ipa-icf-gimple.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-15 11:47:44 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-15 11:47:44 +0000
commit1c543545f83ca31df79487ba5698fe89029ee36c (patch)
tree7f625d6c00ba51bc474ba5e8d9355cf7d4f4512b /gcc/ipa-icf-gimple.c
parent61d3674f00901a2f87afdceabb586b00c6684860 (diff)
downloadgcc-1c543545f83ca31df79487ba5698fe89029ee36c.tar.gz
PR ipa/65765
* ipa-icf-gimple.c (func_checker::compare_bb): For GIMPLE_NOP and GIMPLE_PREDICT use break instead of return true. For GIMPLE_EH_DISPATCH, compare dispatch region. * g++.dg/ipa/pr65765.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222123 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-icf-gimple.c')
-rw-r--r--gcc/ipa-icf-gimple.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
index 09adce3d3ec..9efdea465c2 100644
--- a/gcc/ipa-icf-gimple.c
+++ b/gcc/ipa-icf-gimple.c
@@ -706,7 +706,11 @@ func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2)
return return_different_stmts (s1, s2, "GIMPLE_SWITCH");
break;
case GIMPLE_DEBUG:
+ break;
case GIMPLE_EH_DISPATCH:
+ if (gimple_eh_dispatch_region (as_a <geh_dispatch *> (s1))
+ != gimple_eh_dispatch_region (as_a <geh_dispatch *> (s2)))
+ return return_different_stmts (s1, s2, "GIMPLE_EH_DISPATCH");
break;
case GIMPLE_RESX:
if (!compare_gimple_resx (as_a <gresx *> (s1),
@@ -734,7 +738,7 @@ func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2)
break;
case GIMPLE_PREDICT:
case GIMPLE_NOP:
- return true;
+ break;
default:
return return_false_with_msg ("Unknown GIMPLE code reached");
}