The following testcase causes an ICE since GCC 3.4.0:

===================================
struct A
{
  A& operator= (const A&) !;
};

struct B : A {};

void foo(B b)
{
  b=b;
}
===================================

bug.cc:3: error: expected ';' before '!' token
bug.cc: In member function 'B& B::operator=(const B&)':
bug.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

Related to PR27379, but only happens with inheritance and doesn't crash
GCC 3.0.x.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE on invalid assignment
                    operator declaration
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        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=27380

Reply via email to