diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/spec12.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/spec12.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec12.C b/gcc/testsuite/g++.old-deja/g++.pt/spec12.C new file mode 100644 index 000000000..2e2c6ae7c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec12.C @@ -0,0 +1,22 @@ +// { dg-do run } +extern "C" void abort(); + +template <class T> +struct S +{ + template <class U> + int f(U u); +}; + + +template <> +template <> +int S<char>::f<int>(int i) { return 1; } + +int main() +{ + S<char> sc; + + if (sc.f(3) != 1) + abort(); +} |