The following invalid code snippet causes an ICE in grokdeclarator:

===============================
struct A
{
  virtual static int i;
};
===============================

  bug.cc:3: error: member 'i' cannot be declared both virtual and static
  bug.cc:3: error: 'i' declared as a 'virtual' field
  bug.cc:3: internal compiler error: tree check: expected var_decl or
function_decl or parm_decl, have field_decl in grokdeclarator, at
cp/decl.c:8409

This is a regression from GCC 2.95.3.

Will post patch soon.


-- 
           Summary: [3.4/4.0/4.1/4.2 regression] ICE declaring data member
                    virtual and static
           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=26070

Reply via email to