http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53582

             Bug #: 53582
           Summary: [4.6 regression, fixed in 4.7, I think] ICE on valid
                    code
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: l...@mit.edu


g++ -O2 segfaults on this code.  Tested on gcc (GCC) 4.6.3 20120306 (Red Hat
4.6.3-2).  4.7 and trunk work.  4.5 seems okay as well.

struct A {
  A();
};

unsigned f1();

void f2() {
  while(true) {
    unsigned x;
    try {
      f1();
    } catch(char) {
      x = (unsigned)-1;
    }
    if (x != 1) {
      new A;
      continue;
    }
  }
}

Reply via email to