summaryrefslogtreecommitdiff
path: root/gcc/ipa-icf-gimple.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-01 00:13:10 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-01 00:13:10 +0000
commit2f3662f2e4302bf548d4ac4de6871a926bc57f43 (patch)
treeb32624baede6dc130c452a014b11eb18829b4a1e /gcc/ipa-icf-gimple.c
parent97ccb5175498e2de71247ed19685e7fee5e9335e (diff)
downloadgcc-2f3662f2e4302bf548d4ac4de6871a926bc57f43.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221080 138bc75d-0d04-0410-961f-82ee72b054a4
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 53d2c38bc9f..cbeb7952ca1 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");