This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28560] New: [4.0/4.1/4.2 regression] Trouble with __attribute__ in template parameter
- 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: 31 Jul 2006 21:57:07 -0000
- Subject: [Bug c++/28560] New: [4.0/4.1/4.2 regression] Trouble with __attribute__ in template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following (probably valid) code snippet triggers an ICE since GCC 3.1:
======================================================================
template<typename> struct A {};
template<int> struct B;
template<int N> struct C : A<typename B<N>::X __attribute__((unused))> {};
======================================================================
bug.cc:5: internal compiler error: in layout_type, at stor-layout.c:1851
Please submit a full bug report, [etc.]
A similar code snippet causes a segfault:
======================================================================
template<typename> struct A {};
template<int> struct B;
template<> struct A<B<0> __attribute__((unused))> {};
======================================================================
--
Summary: [4.0/4.1/4.2 regression] Trouble with __attribute__ in
template parameter
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, 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=28560