The following invalid code snippet triggers an ICE on mainline:

============================================================
template<int> struct A;

struct __attribute__((unused)) A<0<;
============================================================

bug.cc:3: error: template argument 1 is invalid
bug.cc:3: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in cp_parser_elaborated_type_specifier, at
cp/parser.c:10245
Please submit a full bug report, [etc.]


-- 
           Summary: [4.2 regression] ICE on attribute for invalid template
           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=28269

Reply via email to