The following (probably valid) code snippet triggers an ICE on mainline: ====================================================================== template<typename T> struct A { struct B; }; struct C { template<typename T> friend struct __attribute__((packed)) A<T>::B; }; ====================================================================== bug.cc:8: internal compiler error: Segmentation fault Please submit a full bug report, [etc.]
A regression hunt on powerpc-linux identified this large patch: http://gcc.gnu.org/viewcvs?view=rev&rev=115086 r115086 | jason | 2006-06-30 01:15:56 +0000 (Fri, 30 Jun 2006)
Subject: Bug 28559 Author: jason Date: Mon Aug 14 21:25:03 2006 New Revision: 116137 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116137 Log: PR c++/28559 * parser.c (cp_parser_elaborated_type_specifier): Also ignore attributes applied to a TYPENAME_TYPE. Added: trunk/gcc/testsuite/g++.dg/ext/attrib25.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c
Fixed.