[Bug middle-end/20991] [4.0 Regression] ICE in cgraph_mark_reachable_node

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Apr 17 16:08:00 GMT 2005


------- Additional Comments From jakub at gcc dot gnu dot org  2005-04-17 16:08 -------
Just got another bugreport for this bug, this time in gnomesword,
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155152

The new references are created in tree-ssa-ccp.c's fold_stmt when it
constant propagates the vptr access, but that is already when
cgraph does not allow new references to be created.

The problem only happens in compilation units that don't output
the virtual table.  But for methods in virtual tables we know that the method
will be emitted in some other compilation unit (where the virtual table
gets emitted), so having the method finalized as unreferenced in
the current compilation unit is not a problem.

So, I think at least as a short time solution we can add a flag to cgraph
node that will signalize that the function is guaranteed to be emitted
in some other CU.  This flag would be set in cp_fold_obj_type_ref
and cgraph_mark_reachable_node would only do something about such nodes
if they have needed set or !cgraph_global_info_ready.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org


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



More information about the Gcc-bugs mailing list