This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28860] New: [4.0/4.1/4.2 regression] Trouble with bound template template parameter in specialization
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Aug 2006 21:47:59 -0000
- Subject: [Bug c++/28860] New: [4.0/4.1/4.2 regression] Trouble with bound template template parameter in specialization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The compiler ICEs on the following invalid code snippet since GCC 3.0:
===================================================
template<template<int> class A> class A<0> {};
===================================================
bug.cc:1: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have bound_template_template_parm in
xref_basetypes, at cp/decl.c:9788
Please submit a full bug report, [etc.]
In addition the compiler accepts the following similar invalid code snippet:
===================================================
template<template<int> class A> class A<0>;
===================================================
Posting a patch soon.
--
Summary: [4.0/4.1/4.2 regression] Trouble with bound template
template parameter in specialization
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, accepts-invalid, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: reichelt at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28860