diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/static1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/static1.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/static1.C b/gcc/testsuite/g++.old-deja/g++.pt/static1.C new file mode 100644 index 000000000..aafd0091d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/static1.C @@ -0,0 +1,22 @@ +// { dg-do run } +extern "C" void abort(); + +template <class T> +class A +{ + public: + static int foo(int); +}; + +template <> +int A<int>::foo(int i) +{ + return i; +} + + +int main() +{ + if (A<int>::foo(22) != 22) + abort(); +} |