diff options
author | Martin Liska <mliska@suse.cz> | 2014-12-19 13:40:50 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2014-12-19 12:40:50 +0000 |
commit | 6b0e0695a52d1a7f82b2adfe460c79254c361e14 (patch) | |
tree | d45345d53057081d17513f486b39473450d4ffc4 /gcc/ipa-icf-gimple.c | |
parent | 1f8d3e84eee6918f3be3e12be67b250840750aeb (diff) | |
download | gcc-6b0e0695a52d1a7f82b2adfe460c79254c361e14.zip gcc-6b0e0695a52d1a7f82b2adfe460c79254c361e14.tar.gz gcc-6b0e0695a52d1a7f82b2adfe460c79254c361e14.tar.bz2 |
re PR ipa/63569 (Wrong code with volatile and ICF)
Fix for PR ipa/63569.
PR ipa/63569
* gcc.dg/ipa/pr63569.c: New test.
PR ipa/63569
* ipa-icf-gimple.c (func_checker::compare_operand): Add missing
comparison for volatile flag.
From-SVN: r218949
Diffstat (limited to 'gcc/ipa-icf-gimple.c')
-rw-r--r-- | gcc/ipa-icf-gimple.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index ec0290a..fa2c353 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -230,6 +230,9 @@ func_checker::compare_operand (tree t1, tree t2) tree tt1 = TREE_TYPE (t1); tree tt2 = TREE_TYPE (t2); + if (TREE_THIS_VOLATILE (t1) != TREE_THIS_VOLATILE (t2)) + return return_false_with_msg ("different operand volatility"); + if (!func_checker::compatible_types_p (tt1, tt2)) return false; |