diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-28 14:09:28 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-28 14:09:28 +0000 |
commit | aa4936de1f3d71964fc6f9822ebdef4d66153b5d (patch) | |
tree | 708ee08746edd9335fd86cd28f444467e07cb7e4 /gcc/fold-const.c | |
parent | c088b381623061af02b7107b75eda7663c66fdde (diff) | |
download | gcc-aa4936de1f3d71964fc6f9822ebdef4d66153b5d.tar.gz |
2005-12-28 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/25394
* fold-const.c (fold_checksum_tree): Guard
portions of checksumming with correct structure checks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109109 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4006d8996a9..2366c754dda 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -10498,13 +10498,16 @@ recursive_label: fold_checksum_tree (TREE_OPERAND (expr, i), ctx, ht); break; case tcc_declaration: - fold_checksum_tree (DECL_SIZE (expr), ctx, ht); - fold_checksum_tree (DECL_SIZE_UNIT (expr), ctx, ht); fold_checksum_tree (DECL_NAME (expr), ctx, ht); fold_checksum_tree (DECL_CONTEXT (expr), ctx, ht); - fold_checksum_tree (DECL_INITIAL (expr), ctx, ht); - fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht); - fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht); + if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_COMMON)) + { + fold_checksum_tree (DECL_SIZE (expr), ctx, ht); + fold_checksum_tree (DECL_SIZE_UNIT (expr), ctx, ht); + fold_checksum_tree (DECL_INITIAL (expr), ctx, ht); + fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht); + fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht); + } if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_WITH_VIS)) fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht); |