[Bug ipa/62051] [4.9/5 Regression] Undefined reference to vtable with -O2 and -fdevirtualize-speculatively

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 19 19:15:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62051

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
yep, this seems to be the usual situation where visibilities does not mix that
well with assumptions that program is linked with symbols defined in the
headers.

I suppose we could make C++ FE to track if a type has methods with visibility
default declared (I can't track that from symbol table as they may be
unreachable). In such case we may want to consider methods of that type with
non-default visibility and no resolution info to be
!can_refer_decl_in_current_unit_p

Jason, would that make sense to you?



More information about the Gcc-bugs mailing list