1// Copyright (C) 2005 Free Software Foundation, Inc. 2// Contributed by Nathan Sidwell 7 Jan 2005 <nathan@codesourcery.com> 3 4// PR 19298: Rejects legal 5// Origin: Andrew Pinski <pinskia@gcc.gnu.org> 6 7struct t 8{ 9 void f() const; 10}; 11 12template <typename _Tp> 13struct A 14{ 15 static t const& c; 16}; 17 18template <typename _Tp> 19void g(void) 20{ 21 A<_Tp>::c.f(); 22} 23 24void h(void) 25{ 26 g<int>(); 27} 28