diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/lookup6.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/lookup6.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/lookup6.C b/gcc/testsuite/g++.old-deja/g++.pt/lookup6.C new file mode 100644 index 000000000..001fedd3d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/lookup6.C @@ -0,0 +1,15 @@ +// { dg-do assemble } + +// Based on bug report by Miniussi <miniussi@ilog.fr> + +class t {}; + +template <class T> struct A { typedef T t; typedef T u; }; + +template <class T> struct B : public A<T> { + // according to [temp.dep.type], `t' and `u' cannot be dependent types, + // and so there's no reason to delay lookup to specialization time. + void f(t p); // this is ::t [temp.dep]/3 + void f(typename A<T>::t p); // { dg-bogus "" } redefinition + void g(u p); // { dg-error "" } unknown type name +}; |