The following invalid testcase triggers an ICE on the trunk:

============================================================
struct A
{
  A(void* i=);
  A(void* i=);
  A(void* i=);

  void operator+ (void* i=);

  virtual void foo1(=);
  void foo2(=);
  void foo3(=);
  void foo4(=);
  void foo5(=);
};

A::A (void* i=) {}
============================================================

bug.cc:4: error: 'A::A(void*)' cannot be overloaded
bug.cc:3: error: with 'A::A(void*)'
[...lots of errors removed...]
bug.cc:16: error: default argument given for parameter 1 of 'A::A(void*)'
bug.cc:3: error: after previous specification in 'A::A(void*)'
bug.cc:16: internal compiler error: canonical types differ for identical types
void (A::)(void*) and void (A::)(void*)
Please submit a full bug report, [etc.]

The testcase is a little fragile, it looks like some memory access is not OK.


-- 
           Summary: [4.4 regression] ICE with lots of invalid member
                    functions
           Product: gcc
           Version: 4.4.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=39060

Reply via email to