OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / crash22.C
1 // { dg-do compile }
2
3 // Origin: Debian GCC maintainers <debian-gcc@lists.debian.org>
4 //         Volker Reichelt <reichelt@gcc.gnu.org>
5
6 // PR c++/16706: Dependent type calculation during access checking
7
8 template<typename> struct A 
9 {
10     A();
11     template<typename> struct X {};
12 };
13
14 template<typename T> struct B
15 {
16     typename A<T>::template X<int> x;
17     template<typename> struct C;
18 };
19
20 template<typename T> template<typename U> struct B<T>::C<U*>
21 {
22     C() {}
23     A<int> a;
24 };
25
26 template struct B<int>::C<int*>;