From 617666b162a4962d40a9b81c5cc0d050109b55ca Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 3 Feb 2012 08:29:31 +0100 Subject: [PATCH] =?utf8?q?backport:=20re=20PR=20tree-optimization/51118=20?= =?utf8?q?(ICE:=20tree=20check:=20expected=20tree=20that=20contains=20?= =?utf8?q?=E2=80=98typed=E2=80=99=20structure,=20have=20=E2=80=98block?= =?utf8?q?=E2=80=99=20in=20fold=5Fchecksum=5Ftree,=20at=20fold-const.c:141?= =?utf8?q?60)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Backport from mainline: 2011-11-18 Uros Bizjak PR tree-optimization/51118 * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure before using TREE_TYPE accessor on expr. From-SVN: r183864 --- gcc/ChangeLog | 11 ++++++++++- gcc/fold-const.c | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f2816c4caaa8..2ff3b717ac08 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-02-02 Uros Bizjak + + Backport from mainline: + 2011-11-18 Uros Bizjak + + PR tree-optimization/51118 + * fold-const.c (fold_checksum_tree): Check for TS_TYPED structure + before using TREE_TYPE accessor on expr. + 2012-01-12 Georg-Johann Lay Backport from mainline r183796 @@ -30,7 +39,7 @@ 2012-01-30 Ramana Radhakrishnan Backport from mainline. - 2012-01-20 Ramana Radhakrishnan + 2012-01-20 Ramana Radhakrishnan PR target/50313 * config/arm/arm.c (arm_load_pic_register): Use diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 51be79dfd0be..c6b5f5d8d0ae 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -13784,7 +13784,8 @@ recursive_label: } } md5_process_bytes (expr, tree_size (expr), ctx); - fold_checksum_tree (TREE_TYPE (expr), ctx, ht); + if (CODE_CONTAINS_STRUCT (code, TS_TYPED)) + fold_checksum_tree (TREE_TYPE (expr), ctx, ht); if (TREE_CODE_CLASS (code) != tcc_type && TREE_CODE_CLASS (code) != tcc_declaration && code != TREE_LIST -- 2.47.2