The following valid code snippet triggers an ICE on mainline: =========================================================== template<int> struct A; template<> struct A<0> { typedef int X __attribute((aligned(4))); }; template<typename T> void foo(const A<0>::X&, T); void bar() { foo(A<0>::X(), 0); } =========================================================== bug.cc: In function 'void bar()': bug.cc:12: internal compiler error: Segmentation fault Please submit a full bug report, [etc.]
Confirmed.
Subject: Bug 35097 Author: jason Date: Tue Feb 12 06:34:59 2008 New Revision: 132253 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132253 Log: PR c++/35097 * pt.c (tsubst): Don't look up a template typedef in an explicit specialization. Added: trunk/gcc/testsuite/g++.dg/ext/attrib31.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c
Fixed.