summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash22.C
blob: 4d0cfaa999e7ed62023c97d81b96faeb6d64d2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do compile }

// Origin: Debian GCC maintainers <debian-gcc@lists.debian.org>
//	   Volker Reichelt <reichelt@gcc.gnu.org>

// PR c++/16706: Dependent type calculation during access checking

template<typename> struct A 
{
    A();
    template<typename> struct X {};
};

template<typename T> struct B
{
    typename A<T>::template X<int> x;
    template<typename> struct C;
};

template<typename T> template<typename U> struct B<T>::C<U*>
{
    C() {}
    A<int> a;
};

template struct B<int>::C<int*>;