The following invalid testcase triggers an ICE since GCC 4.2.0:

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

bug.cc:1:14: error: two or more data types in declaration of 'parameter'
bug.cc:2:14: error: two or more data types in declaration of 'parameter'
bug.cc:2:26: error: redefinition of default argument for '<declaration error>'
bug.cc:2:26: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'error_mark' in redeclare_class_template, at
cp/pt.c:4576
Please submit a full bug report, [etc.]


-- 
           Summary: [4.3/4.4/4.5 Regression] ICE with invalid template
                    parameter
           Product: gcc
           Version: 4.5.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=42054

Reply via email to