From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15564 invoked by alias); 11 Sep 2014 13:48:28 -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 15515 invoked by uid 48); 11 Sep 2014 13:48:21 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/63226] New: ICE with -flto-odr-type-merging Date: Thu, 11 Sep 2014 13:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org 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 cc 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: 2014-09/txt/msg01421.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63226 Bug ID: 63226 Summary: ICE with -flto-odr-type-merging Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: hubicka at gcc dot gnu.org The ICE depends on Honza's no-yet committed patch: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00878.html With that patch (and hence -flto-odr-type-merging), one gets the following ICE: $ g++ -c -flto one12.ii two10.ii $ g++ -flto -flto-odr-type-merging one12.o two10.ii lto1: internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1066 0x815714 odr_types_equivalent_p ../../gcc/ipa-devirt.c:1066 0x815a3e add_type_duplicate ../../gcc/ipa-devirt.c:1116 Note: -Wodr doesn't warn for this test case. With the files one12.ii: ---------------------------------------- class ONE; class OneClass { ONE *swpmi; OneClass (); }; typedef struct ynodetype_t *ynode; typedef struct ynodetype_t { union { struct { ynode child1, child3; } i; } y; } ynodetype; class ONE { union _xynode { ynode yn; } ; }; OneClass::OneClass () { } ---------------------------------------- two10.ii: ---------------------------------------- class ONE; class TwoClass { ONE *swpci; TwoClass (); }; typedef struct ynodetype_t *ynode; typedef struct { } yleaftype; typedef struct ynodetype_t { union { struct { yleaftype leaf; } i; } y; } ynodetype; typedef ynode ytree; class ONE { ytree Tree; }; TwoClass::TwoClass () { } ----------------------------------------