This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/41377] New: [4.5 Regression] ICE in unsplit_eh
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2009 14:39:01 -0000
- Subject: [Bug tree-optimization/41377] New: [4.5 Regression] ICE in unsplit_eh
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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<int> 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