From: Daniel Berlin Date: Wed, 28 Dec 2005 14:09:28 +0000 (+0000) Subject: re PR tree-optimization/25394 (libgcc2.c:2033: ICE: tree check: expected tree that... X-Git-Tag: releases/gcc-4.2.0~5132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eb046081bda6816fa9a59efa63cb2a1db7f4595;p=thirdparty%2Fgcc.git re PR tree-optimization/25394 (libgcc2.c:2033: ICE: tree check: expected tree that contains 'decl common' structure, have 'name_memory_tag') 2005-12-28 Daniel Berlin Fix PR tree-optimization/25394 * fold-const.c (fold_checksum_tree): Guard portions of checksumming with correct structure checks. From-SVN: r109109 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a3f53ff404a..2b7ff265bfb0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-12-28 Daniel Berlin + + Fix PR tree-optimization/25394 + * fold-const.c (fold_checksum_tree): Guard + portions of checksumming with correct structure checks. + 2005-12-27 Kazu Hirata * global.c, tree-ssa-pre.c: Move DEF_VEC_P(basic_block) and diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4006d8996a9c..2366c754dda9 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);