This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34271] New: [4.3 regression] ICE in invalid initialization of static template member
- 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: 28 Nov 2007 21:17:44 -0000
- Subject: [Bug c++/34271] New: [4.3 regression] ICE in invalid initialization of static template member
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE on mainline:
=====================================================
template<int> struct A
{
static int i;
};
template<int N> int A<N>::i(__decltype( A::i ));
=====================================================
bug.cc:6: internal compiler error: in finish_decltype_type, at
cp/semantics.c:4158
Please submit a full bug report, [etc.]
A slightly modified testcase crashes in a different position:
=====================================================
template<int> struct A
{
static int i;
};
template<int N> int A<N>::i(__decltype( A::i;
=====================================================
bug.cc:6: internal compiler error: in lvalue_p_1, at cp/tree.c:149
Please submit a full bug report, [etc.]
--
Summary: [4.3 regression] ICE in invalid initialization of static
template member
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-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=34271