From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97379 invoked by alias); 23 Mar 2015 21:18:32 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 97268 invoked by uid 55); 23 Mar 2015 21:18:28 -0000 From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/62051] [4.9/5 Regression] Undefined reference to vtable with -O2 and -fdevirtualize-speculatively Date: Mon, 23 Mar 2015 23:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg02454.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62051 --- Comment #7 from Jan Hubicka --- > > 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.