From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59018 invoked by alias); 12 Aug 2015 10:37:10 -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 58953 invoked by uid 48); 12 Aug 2015 10:37:07 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65143] [C++11] missing devirtualization for virtual base in "final" classes Date: Wed, 12 Aug 2015 10:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-08/txt/msg00761.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65143 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |trippels at gcc dot gnu.org --- Comment #6 from Markus Trippelsdorf --- Testcase from PR67184: markus@x4 tmp % cat test.ii struct V { virtual void foo(); }; struct wV final : V {}; struct oV final : V { void foo(); }; void call(V &x) { x.foo(); } void call(wV &x) { x.foo(); } void call(oV &x) { x.foo(); } markus@x4 tmp % clang++ -std=c++14 -c -O3 -S test.ii -o - ... _Z4callR2wV: # @_Z4callR2wV .cfi_startproc # BB#0: # %entry jmp _ZN1V3fooEv # TAILCALL ... markus@x4 tmp % g++ -std=c++14 -O3 -c -S test.ii -o - ... _Z4callR2wV: .LFB1: .cfi_startproc movq (%rdi), %rax jmp *(%rax)