[Bug ipa/59226] [4.9 Regression] ICE: in record_target_from_binfo, at ipa-devirt.c:661
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 16 19:28:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59226
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |trippels at gcc dot gnu.org
--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Honza,
I've tested your patch from comment 7 and it doesn't work.
However your suggestion "to simply return NULL when inner_binfo is NULL"
does seem to work fine. I've successfully build Chromium with it.
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index f5b5926504c7..c0fce4cde069 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -648,6 +648,8 @@ record_target_from_binfo (vec <cgraph_node *> &nodes,
{
tree inner_binfo = get_binfo_at_offset (type_binfo,
offset, otr_type);
+ if (!inner_binfo)
+ return;
/* For types in anonymous namespace first check if the respective vtable
is alive. If not, we know the type can't be called. */
if (!flag_ltrans && anonymous)
@@ -661,7 +663,6 @@ record_target_from_binfo (vec <cgraph_node *> &nodes,
if (!vnode || !vnode->definition)
return;
}
- gcc_assert (inner_binfo);
if (!pointer_set_insert (matched_vtables, BINFO_VTABLE (inner_binfo)))
{
tree target = gimple_get_virt_method_for_binfo (otr_token,
inner_binfo);
More information about the Gcc-bugs
mailing list