From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3639 invoked by alias); 16 Sep 2009 14:39:20 -0000 Received: (qmail 3596 invoked by uid 48); 16 Sep 2009 14:39:01 -0000 Date: Wed, 16 Sep 2009 14:39:00 -0000 Subject: [Bug tree-optimization/41377] New: [4.5 Regression] ICE in unsplit_eh X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" 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: 2009-09/txt/msg01469.txt.bz2 The following testcase triggers an ICE on the trunk when compiled with "-O3": =============================================================== struct A { bool foo(int*) const; } a; struct B {}; struct B1 : B { bool (A::*pmf)(int*) const; const A* pa; B1() : pmf(&A::foo), pa(&a) {} bool operator()() const { return (pa->*pmf)(new int); } }; struct B2 : B { B1 b1; B2(const B1& _b1) : b1(_b1) {} bool operator()() const { return b1(); } }; template struct C { void bar(B2 b2) { while (b2()) ; } C() { bar(B2(B1())); } }; void baz(int i) { switch(i) { case 0: new C<0>; case 1: new C<1>; case 2: new C<2>; } } =============================================================== bug.cc: In function 'baz(int)': bug.cc:31:6: internal compiler error: in unsplit_eh, at tree-eh.c:3359 Please submit a full bug report, [etc.] -- Summary: [4.5 Regression] ICE in unsplit_eh Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41377