From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33046 invoked by alias); 24 Feb 2015 11:19:47 -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 33017 invoked by uid 48); 24 Feb 2015 11:19:44 -0000 From: "meisenmann.lba@fh-salzburg.ac.at" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65189] New: Malformed (C++) class-hierarchy dump on abstract class (in comparission to GCC 4.6.x) Date: Tue, 24 Feb 2015 11:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: meisenmann.lba@fh-salzburg.ac.at X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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-02/txt/msg02618.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65189 Bug ID: 65189 Summary: Malformed (C++) class-hierarchy dump on abstract class (in comparission to GCC 4.6.x) Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: meisenmann.lba@fh-salzburg.ac.at Following minimal sample (Ie. test.cpp) does generate a noticeable different class-hierarchy dump with GCC 4.9.2 - compared to GCC 4.6.4: class A { public: virtual ~A(); virtual int getVal() const = 0; }; Calling gcc -c -fdump-classhierarchy test.cpp && type test.cpp.002t.class a) generates with GCC 4.6.4 (as expected): Vtable for A A::_ZTV1A: 5u entries 0 (int (*)(...))0 4 (int (*)(...))(& _ZTI1A) 8 (int (*)(...))A::~A 12 (int (*)(...))A::~A 16 (int (*)(...))__cxa_pure_virtual Class A .. dropped; Ie. no difference b) with GCC 4.9.2, the output is A::_ZTV1A: 5u entries 0 (int (*)(...))0 4 (int (*)(...))(& _ZTI1A) 8 (int (*)(...))0u 12 (int (*)(...))0u 16 (int (*)(...))__cxa_pure_virtual The two d'tor-entries (offset 8 and 12) are 0u ?! This issue also affects the generated dump with option "-fdump-translation-unit" ... which is used by the ABI Compliance Checker (ABICC). For example, if I compare the ABI-compatibility of abstract classes between different GCC-versions, a incorrect/false-positive mismatch of the vtable (concerning the virtual d'tor entries) is determined. I've already tested some additional options to dtermine a work-around, but without luck! Best regards from Salzburg, Markus