This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/62051] [4.9/5 Regression] Undefined reference to vtable with -O2 and -fdevirtualize-speculatively
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Mar 2015 21:18:27 +0000
- Subject: [Bug ipa/62051] [4.9/5 Regression] Undefined reference to vtable with -O2 and -fdevirtualize-speculatively
- Auto-submitted: auto-generated
- References: <bug-62051-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62051
--- Comment #7 from Jan Hubicka <hubicka at ucw dot cz> ---
>
> Yes, though I think for such a class we probably want to consider all virtual
> methods unreachable unless they have explicit default visibility; in the
> testcase the main program isn't being compiled with -fvisibility=hidden, so
> ~Derived has implicit default visibility.
Yes, I think this makes sense. Do you think you can implement the C++ FE part
that will mark classes having methods with visibility specified?
We do not LTO stream TYPE_METHODS so this is bit hard to determine at
gimple-fold
time. At some point I tried to enable TYPE_METHODS streaming but it had bad
effect on firefox LTO linktimes by significantly increasing strongly connected
component size.