From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4492 invoked by alias); 22 May 2012 16:11:59 -0000 Received: (qmail 4475 invoked by uid 22791); 22 May 2012 16:11:56 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 May 2012 16:11:43 +0000 From: "roman at binarylife dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/53432] [4.8 Regression] ICE failed to reclaim unneeded function in same comdat group Date: Tue, 22 May 2012 16:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: roman at binarylife dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-05/txt/msg02212.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53432 Roman Kononov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roman at binarylife dot net --- Comment #2 from Roman Kononov 2012-05-22 16:11:42 UTC --- Here is a testcase (independent of the original one): $ cat test.cpp struct A; struct B; struct AA { virtual void afoo(A&); }; struct BB { virtual void bfoo(B&); }; template void bar(A& a,X& x) { x.afoo(a); } void bar(A& ss,int& x); struct ZZ: BB, AA { int i; void afoo(A& a) { bar(a,i); } void bfoo(B&); }; void bar(A& a) { ZZ zz; bar(a,zz); } $ g++ -c -O2 test.cpp _ZN2ZZ4afooER1A/0 (virtual void ZZ::afoo(A&)) @0x7f1ecda1cc30 Type: function Visibility: public weak comdat comdat_group:_ZN2ZZ4afooER1A one_only section_name:.text._ZN2ZZ4afooER1A virtual Same comdat group as: _ZThn8_N2ZZ4afooER1A/2 Address is taken. References: Referring: _ZTV2ZZ/16 (addr) Availability: not_available Function flags: body finalized Called by: Calls: test.cpp:23:1: internal compiler error: failed to reclaim unneeded function in same comdat group } ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions.