diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/unify2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/unify2.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify2.C b/gcc/testsuite/g++.old-deja/g++.pt/unify2.C new file mode 100644 index 000000000..5a9b2d26e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify2.C @@ -0,0 +1,27 @@ +// { dg-do assemble } + +template <class T> +struct S +{ + typedef T S_Type; +}; + + +template <class T> +void foo(typename S<T>::S_Type) +{ +} + + +template <class T> +void foo(T) +{ +} + + +struct S2 {}; + +void bar() +{ + foo(S2()); // We can't unify with the first foo, so we get the second. +} |