diff options
author | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-07 12:35:43 +0000 |
---|---|---|
committer | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-07 12:35:43 +0000 |
commit | b90dc9e916b8bd8e36c35bf1127a4ea81e04eb6a (patch) | |
tree | 44271cd0fb5a71b824811bdca1bbf30dff0728b8 /gcc/ipa-icf-gimple.c | |
parent | fd43cc5994d37643c4b887558af575f9441babd9 (diff) | |
download | gcc-b90dc9e916b8bd8e36c35bf1127a4ea81e04eb6a.tar.gz |
PR ipa/63747
* gcc.dg/ipa/pr63747.c: New test.
* ipa-icf-gimple.c (func_checker::compare_gimple_switch):
Missing checking for CASE_LOW and CASE_HIGH added.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217219 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-icf-gimple.c')
-rw-r--r-- | gcc/ipa-icf-gimple.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index ecb96671fb7..75b5cfbc202 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -798,6 +798,19 @@ func_checker::compare_gimple_switch (gimple g1, gimple g2) tree label1 = gimple_switch_label (g1, i); tree label2 = gimple_switch_label (g2, i); + /* Label LOW and HIGH comparison. */ + tree low1 = CASE_LOW (label1); + tree low2 = CASE_LOW (label2); + + if (!tree_int_cst_equal (low1, low2)) + return return_false_with_msg ("case low values are different"); + + tree high1 = CASE_HIGH (label1); + tree high2 = CASE_HIGH (label2); + + if (!tree_int_cst_equal (high1, high2)) + return return_false_with_msg ("case high values are different"); + if (TREE_CODE (label1) == CASE_LABEL_EXPR && TREE_CODE (label2) == CASE_LABEL_EXPR) { |