aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-icf-gimple.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2015-03-01 01:13:10 +0100
committerMartin Liska <marxin@gcc.gnu.org>2015-03-01 00:13:10 +0000
commite8fb91a8499ab23527737fe5fa9d72478e3d93b2 (patch)
treeb32624baede6dc130c452a014b11eb18829b4a1e /gcc/ipa-icf-gimple.c
parentbbcdfb939d7ef82bd50afe51b1f332f7191e6d27 (diff)
downloadgcc-e8fb91a8499ab23527737fe5fa9d72478e3d93b2.zip
gcc-e8fb91a8499ab23527737fe5fa9d72478e3d93b2.tar.gz
gcc-e8fb91a8499ab23527737fe5fa9d72478e3d93b2.tar.bz2
ICF is more strict about non-common function and var
* ipa-icf-gimple.c (func_checker::compare_variable_decl): Validate variable alignment. * ipa-icf.c (sem_function::equals_private): Be more precise about non-common function attributes. (sem_variable::equals): Likewise. * gcc.target/i386/stackalign/longlong-2.c: Omit ICF. * g++.dg/ipa/pr63595.C: Update expected results. From-SVN: r221080
Diffstat (limited to 'gcc/ipa-icf-gimple.c')
-rw-r--r--gcc/ipa-icf-gimple.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
index 53d2c38..cbeb795 100644
--- a/gcc/ipa-icf-gimple.c
+++ b/gcc/ipa-icf-gimple.c
@@ -575,6 +575,9 @@ func_checker::compare_variable_decl (tree t1, tree t2)
if (t1 == t2)
return true;
+ if (DECL_ALIGN (t1) != DECL_ALIGN (t2))
+ return return_false_with_msg ("alignments are different");
+
if (DECL_HARD_REGISTER (t1) != DECL_HARD_REGISTER (t2))
return return_false_with_msg ("DECL_HARD_REGISTER are different");