The following valid code snippet triggers an ICE on the trunk: ============================== struct A { typedef int X; };
template<int> union B { A::X x; }; ============================== bug.cc:8:6: internal compiler error: in append_type_to_template_for_access_check_1, at cp/pt.c:17353 Please submit a full bug report, [etc.] The regression appeared between 2009-05-22 and 2009-06-01. Looks like it was caused by the following patch: 2009-05-26 Dodji Seketeli <do...@redhat.com> PR c++/40007 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Remove this accessor. (TI_TYPEDEFS_NEEDING_ACCESS_CHECKING): New accessor. (get_types_needing_access_check): Declare new entry point. * pt.c (append_type_to_template_for_access_check_1, get_types_needing_access_check): New functions. [...] -- Summary: [4.5 Regression] ICE with template union Product: gcc Version: 4.5.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=40557