OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / template-id-2.C
1 // { dg-do compile }
2
3 // Origin: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
4
5 // PR c++/12924
6
7 template<typename> struct A {};
8
9 template<> struct A<void>
10 {
11     template<typename T> void foo()
12     {
13         A<T> a;
14         a.template foo<int>();  // { dg-error "no member" }
15     }
16 };
17
18 void bar()
19 {
20     A<void> a;
21     a.foo<int>();               // { dg-message "instantiated" }
22 }