[Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Nov 5 20:22:00 GMT 2006
The following invalid code snippet triggers an ICE since GCC 3.3:
=================================================
template<int> struct A
{
static int a[1];
};
template<int N> int A<N>::a[1] = { X: 0 };
void foo()
{
A<0>::a;
}
=================================================
bug.cc: In instantiation of 'int A<0>::a [1]':
bug.cc:10: instantiated from here
bug.cc:6: error: 'X' was not declared in this scope
bug.cc:6: internal compiler error: in reshape_init_array_1, at cp/decl.c:4350
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer
for template member
Product: gcc
Version: 4.3.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=29727
More information about the Gcc-bugs
mailing list