[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 18:00:00 GMT 2011


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

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-17 17:50:44 UTC ---
Better 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 (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
--cut here--



More information about the Gcc-bugs mailing list