This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/41377] New: [4.5 Regression] ICE in unsplit_eh


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]