The following invalid code snippet causes an ICE on mainline:

===================================
template<operator T> void foo()
{
  struct A {};
}
===================================

bug.cc:1: error: expected identifier before 'operator'
bug.cc:1: error: expected `>' before 'operator'
bug.cc: In function 'void foo()':
bug.cc:3: internal compiler error: tree check: accessed elt 1 of tree_vec with
0 elts in any_dependent_template_arguments_p, at cp/pt.c:12762
Please submit a full bug report, [etc.]


-- 
           Summary: [4.2 regression] ICE on invalid template parameter
           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=27493

Reply via email to