public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/41377]  New: [4.5 Regression] ICE in unsplit_eh
@ 2009-09-16 14:39 reichelt at gcc dot gnu dot org
  2009-09-16 14:39 ` [Bug tree-optimization/41377] " reichelt at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-09-16 14:39 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-10-13 18:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 14:39 [Bug tree-optimization/41377] New: [4.5 Regression] ICE in unsplit_eh reichelt at gcc dot gnu dot org
2009-09-16 14:39 ` [Bug tree-optimization/41377] " reichelt at gcc dot gnu dot org
2009-09-18  4:11 ` pinskia at gcc dot gnu dot org
2009-09-18  9:25 ` rguenth at gcc dot gnu dot org
2009-09-18 13:49 ` [Bug tree-optimization/41377] [4.5 Regression] Revision 151696 caused " hjl dot tools at gmail dot com
2009-09-19 20:41 ` rguenth at gcc dot gnu dot org
2009-09-20 20:50 ` [Bug tree-optimization/41377] [4.5 Regression] gimple EH rewrite causes ICE with PPRE (enabled at -O3) pinskia at gcc dot gnu dot org
2009-10-11 12:05 ` rguenth at gcc dot gnu dot org
2009-10-12 22:34 ` rth at gcc dot gnu dot org
2009-10-13 18:42 ` rth at gcc dot gnu dot org
2009-10-13 18:45 ` rth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).