template <const char *N> struct A { };
template <class T> struct B { static const char c[1]; typedef A<B<T>::c> C; };
ICEs in instantiate_decl.
template <const int N> struct A { };
template <class T> struct B { static const int c; typedef A<B<T>::c> C; };
template <class T> const int B<T> c = sizeof (T);
ICEs too, while e.g.
template <const int N> struct A { };
template <class T> struct B { static const int c = sizeof (T); typedef
A<B<T>::c> C; };
does not.
--
Summary: [4.4/4.5/4.6 Regression] ICE in instantiate_decl
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44587