[Bug lto/62034] ICE for big statically initialized arrays compiled with LTO
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 6 12:37:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62034
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Or actually
Index: gcc/lto-streamer-in.c
===================================================================
--- gcc/lto-streamer-in.c (revision 213660)
+++ gcc/lto-streamer-in.c (working copy)
@@ -1324,15 +1324,7 @@ lto_input_tree_1 (struct lto_input_block
streamer_tree_cache_append (data_in->reader_cache, result, hash);
}
else if (tag == LTO_tree_scc)
- {
- unsigned len, entry_len;
-
- /* Input and skip the SCC. */
- lto_input_scc (ib, data_in, &len, &entry_len);
-
- /* Recurse. */
- return lto_input_tree (ib, data_in);
- }
+ gcc_unreachable ();
else
{
/* Otherwise, materialize a new node from IB. */
@@ -1345,7 +1337,15 @@ lto_input_tree_1 (struct lto_input_block
tree
lto_input_tree (struct lto_input_block *ib, struct data_in *data_in)
{
- return lto_input_tree_1 (ib, data_in, streamer_read_record_start (ib), 0);
+ enum LTO_tags tag;
+
+ /* Input and skip SCCs. */
+ while ((tag = streamer_read_record_start (ib)) == LTO_tree_scc)
+ {
+ unsigned len, entry_len;
+ lto_input_scc (ib, data_in, &len, &entry_len);
+ }
+ return lto_input_tree_1 (ib, data_in, tag, 0);
}
More information about the Gcc-bugs
mailing list