From: Tom de Vries Date: Sun, 22 May 2011 19:00:33 +0000 (+0000) Subject: re PR middle-end/48689 (ICE in fold-const.c:13798 with fold checking) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5fb43dd8356409f824c16666f6a45f3b89c2a8f2;p=gcc.git re PR middle-end/48689 (ICE in fold-const.c:13798 with fold checking) 2011-05-22 Tom de Vries PR middle-end/48689 * fold-const.c (fold_checksum_tree): Guard TREE_CHAIN use with CODE_CONTAINS_STRUCT (TS_COMMON). From-SVN: r174035 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 122e4dff57e..933ebf4ea76 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-22 Tom de Vries + + PR middle-end/48689 + * fold-const.c (fold_checksum_tree): Guard TREE_CHAIN use with + CODE_CONTAINS_STRUCT (TS_COMMON). + 2011-05-22 Jakub Jelinek PR middle-end/49029 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ab68eab990c..d399c5376d2 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -13822,7 +13822,8 @@ recursive_label: if (TREE_CODE_CLASS (code) != tcc_type && TREE_CODE_CLASS (code) != tcc_declaration && code != TREE_LIST - && code != SSA_NAME) + && code != SSA_NAME + && CODE_CONTAINS_STRUCT (code, TS_COMMON)) fold_checksum_tree (TREE_CHAIN (expr), ctx, ht); switch (TREE_CODE_CLASS (code)) {