gcc/testsuite/g++.dg/template/access6.C
raw| 1 | // { dg-do compile } |
| 2 | // Origin: Detlef Vollmann <[email protected]> |
| 3 | |
| 4 | // PR c++/8389 |
| 5 | // Access control ICE for typename during instantiation and name mangling |
| 6 | |
| 7 | template <class> class Base { |
| 8 | protected: |
| 9 | typedef int Type; |
| 10 | }; |
| 11 | |
| 12 | template <class T> struct Derived : public Base<T> { |
| 13 | typedef typename Base<T>::Type Type; |
| 14 | template <class Arg> void f(Type = Type()) {} |
| 15 | }; |
| 16 | |
| 17 | template void Derived<char>::f<int> (Type); |