diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/access6.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/access6.C | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/access6.C b/gcc/testsuite/g++.dg/template/access6.C new file mode 100644 index 000000000..cbc8000d1 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/access6.C @@ -0,0 +1,17 @@ +// { dg-do compile } +// Origin: Detlef Vollmann <dv@vollmann.ch> + +// PR c++/8389 +// Access control ICE for typename during instantiation and name mangling + +template <class> class Base { + protected: + typedef int Type; +}; + +template <class T> struct Derived : public Base<T> { + typedef typename Base<T>::Type Type; + template <class Arg> void f(Type = Type()) {} +}; + +template void Derived<char>::f<int> (Type); |