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.
P2 as we likely do sth bogus when we not ICE (with checking disabled).
Also related to PR28879
Subject: Bug 34962 Author: jason Date: Wed Feb 13 21:27:16 2008 New Revision: 132297 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132297 Log: PR c++/34962, c++/34937, c++/34939 * decl2.c (is_late_template_attribute): Always defer attributes vector_size and weak. Added: trunk/gcc/testsuite/g++.dg/ext/tmplattr9.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl2.c
Closing 4.1 branch.
Fixed in 4.3.