[Bug c++/18729] New: [4.0 regression] ICE on invalid typedef

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 29 23:43:00 GMT 2004


The following invalid code snippet causes an ICE on mainline.

=================================
template<typename T> struct A
{
    typedef typename T::X Y;
};

A<int>::Y y;
=================================

bug.cc: In instantiation of 'A<int>':
bug.cc:6:   instantiated from here
bug.cc:3: error: 'int' is not a class, struct, or union type
bug.cc:6: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in cp_parser_class_name, at cp/parser.c:12235
Please submit a full bug report,

Mark, the regression was introduced by your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-11/msg01422.html
Could you please have a look?

-- 
           Summary: [4.0 regression] ICE on invalid typedef
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18729



More information about the Gcc-bugs mailing list