This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41487] ICE in duplicate_node_data, at ipa-pure-const.c:633
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Sep 2009 13:01:04 -0000
- Subject: [Bug lto/41487] ICE in duplicate_node_data, at ipa-pure-const.c:633
- References: <bug-41487-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from rguenth at gcc dot gnu dot org 2009-09-30 13:01 -------
During pure_const_read_summary lto_cgraph_encoder_deref returns a reference
to a bogus cgraph node (it's all zeros, just the UID is filled in). Later
the cgraph node gets reused by cgraph_clone_node. So something like the
following solves this for the testcase:
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c (revision 152324)
+++ ipa-pure-const.c (working copy)
@@ -788,7 +788,8 @@ pure_const_read_summary (void)
index = lto_input_uleb128 (ib);
encoder = file_data->cgraph_node_encoder;
node = lto_cgraph_encoder_deref (encoder, index);
- set_function_state (node, fs);
+ if (node->decl)
+ set_function_state (node, fs);
/* Note that the flags must be read in the opposite
order in which they were written (the bitflags were
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41487