diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C new file mode 100644 index 000000000..d5cba8cfa --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp93.C @@ -0,0 +1,16 @@ +// { dg-do link } +// Origin: Mark Mitchell <mark@codesourcery.com> + +template <int n> struct A { + template <class T> A (T t); + template <class T> int f(T t) const; +}; + +template <> template<class T> int A<1>::f(T t) const {return 1;} +template <> template<class T> A<1>::A (T t) {} + +int main() { + A<1> a (3); + a.f(1); + return 0; +} |