[Bug c++/27547] New: [4.0/4.1/4.2 regression] ICE on invalid operator=

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu May 11 07:01:00 GMT 2006


Since GCC 3.4.0 the C++ frontend ICEs on the following invalid code snippet:

========================
int operator=(int);

void foo()
{
  operator=(0);
}
========================

bug.cc:1: error: 'int operator=(int)' must be a nonstatic member function
bug.cc: In function 'void foo()':
bug.cc:5: internal compiler error: in copy_fn_p, at cp/decl.c:8821
Please submit a full bug report, [etc.]

I'll post a patch soon.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE on invalid operator=
           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=27547



More information about the Gcc-bugs mailing list