[Bug tree-optimization/51118] [4.7 Regression] ICE: tree check:=?UTF-8?Q?=20expected=20tree=20that=20contains=20=E2=80=98typed=E2=80=99=20structure?=,=?UTF-8?Q?=20have=20=E2=80=98block=E2=80=99=20in=20fold=5Fchecksum=5Ftree?=, at fold-const.c:14160

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Nov 17 17:34:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51118

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |ubizjak at gmail dot com
                   |gnu.org                     |

--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-17 17:21:29 UTC ---
The patch:

--cut here--
Index: fold-const.c
===================================================================
--- fold-const.c    (revision 181443)
+++ fold-const.c    (working copy)
@@ -14157,7 +14157,8 @@
     }
     }
   md5_process_bytes (expr, tree_size (expr), ctx);
-  fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
+  if (TREE_CODE_CLASS (code) == tcc_type)
+    fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
   if (TREE_CODE_CLASS (code) != tcc_type
       && TREE_CODE_CLASS (code) != tcc_declaration
       && code != TREE_LIST
--cut here--



More information about the Gcc-bugs mailing list