re PR middle-end/48689 (ICE in fold-const.c:13798 with fold checking)
authorTom de Vries <tom@codesourcery.com>
Sun, 22 May 2011 19:00:33 +0000 (19:00 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sun, 22 May 2011 19:00:33 +0000 (19:00 +0000)
2011-05-22  Tom de Vries  <tom@codesourcery.com>

PR middle-end/48689
* fold-const.c (fold_checksum_tree): Guard TREE_CHAIN use with
CODE_CONTAINS_STRUCT (TS_COMMON).

From-SVN: r174035

gcc/ChangeLog
gcc/fold-const.c

index 122e4dff57e045011b99942111faba384a64e043..933ebf4ea76e470610c99c6701f20fb864fc7240 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-22  Tom de Vries  <tom@codesourcery.com>
+
+       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  <jakub@redhat.com>
 
        PR middle-end/49029
index ab68eab990cc0bd692d45246c798c53d4e87d565..d399c5376d2c341840f9044b5abbd10985fa5d2f 100644 (file)
@@ -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))
     {