1 // PR c++/77304
2 // { dg-do compile { target c++2a } }
3 
4 struct S {};
5 
6 template < typename T > struct A
7 {
fA8   template < S > void f () {}
9 
gA10   static void * g ()
11   {
12     return (void *) f < a >; // { dg-error "invalid" }
13   }
14 
15   static S a;
16 };
17 
f()18 void * f ()
19 {
20   return A < int >::g ();
21 }
22