The following invalid code snippet triggers an ICE since GCC 4.0.0:
=================================================================
struct A
{
static const int i;
};
template<int> void foo()
{
int x[A::i] __attribute((vector_size(8)));
}
=================================================================
bug.cc: In function 'void foo()':
bug.cc:8: internal compiler error: tree check: did not expect class 'type',
have 'type' (record_type) in contains_placeholder_p, at tree.c:2267
Please submit a full bug report, [etc.]
This is related to PR34913, but not yet fixed.
--
Summary: [4.1/4.2/4.3 regression] ICE with VLA and attribute in
template
Product: gcc
Version: 4.3.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=34962