1 // Copyright (C) 2005 Free Software Foundation, Inc. 2 // Contributed by Nathan Sidwell 26 May 2005 <nathan@codesourcery.com> 3 4 // Origin:Volker Reichelt reichelt@gcc.gnu.org 5 // PR 21681. ICE with inappropriate access check. 6 7 template<int X> struct A; 8 9 struct B 10 { fooB11 template<int N> void foo() 12 { 13 A<N>::X::Y; 14 } 15 }; 16