This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24671] New: [4.0/4.1 regression] ICE with zero-sized arrays
- 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: 4 Nov 2005 11:47:11 -0000
- Subject: [Bug c++/24671] New: [4.0/4.1 regression] ICE with zero-sized arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following testcase causes an ICE:
==============================================
template<typename> struct A
{
typedef int X;
static const int i = 0;
};
template<typename> struct B
{
typedef typename A<char[A<B>::i]>::X Y;
template<typename T> B(T, Y);
};
B<int> b(0,0);
==============================================
dPR19208B.cc:10: internal compiler error: in push_access_scope, at cp/pt.c:176
Please submit a full bug report, [etc.]
The testcase crashed since at least gcc 2.95.3, but was fixed with the
patch for PR19208. The problem reappeared on the 3.4 branch and mainline
with Josh's patch for PR 19989.
I think the code should be accepted at least with -fpermissive,
but rejected with -pedantic.
--
Summary: [4.0/4.1 regression] ICE with zero-sized arrays
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Keywords: ice-on-valid-code, 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
BugsThisDependsOn: 19208,19989
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24671