Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / template / crash21.C
blob8b674910e52280a67b6aa40c2ba33dd2b05b6473
1 // { dg-do compile }
3 // Origin: Debian GCC maintainers <debian-gcc@lists.debian.org>
4 //         Wolfgang Bangerth <bangerth@dealii.org>
6 // PR c++/16706: Dependent type calculation during access checking
8 template <typename> struct B { 
9     B() throw() {} 
10     struct S { }; 
11     static int i; 
12     typedef unsigned short int dummy; 
13 }; 
15 template <typename _Tp> 
16 struct allocator: B<_Tp> { 
17     template<typename _Tp1> struct rebind 
18     { typedef allocator<_Tp1> other; }; 
19 }; 
21 template<typename T, typename> 
22 struct X { 
23     typename allocator<T>::template rebind<int>::other i; 
24     typedef int* dummy; 
25 }; 
27 template <class T> class A { 
28     typedef typename X<T,allocator<T> >::dummy dummy; 
29     template <class TP> class XWrapper; 
30 }; 
33 template <class T> 
34 template <class TP> struct A<T>::XWrapper<TP *> 
35
36     XWrapper() {} 
37     X<int,allocator<int> > x; 
38 }; 
40 template class A<int>::XWrapper<int *>;