diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/friend29.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/friend29.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend29.C b/gcc/testsuite/g++.old-deja/g++.pt/friend29.C new file mode 100644 index 000000000..95cbb0e6a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/friend29.C @@ -0,0 +1,20 @@ +// { dg-do assemble } + +template <class T> class a; + +template <class T> void foo( a<T>& thea ); + +template <class T> class a { +public: + friend void foo<>( a<T>& thea ); +private: + T amember; +}; + +template <class T> void foo( a<T>& thea ) +{ + thea.amember = 0; +} + +template class a<int>; + |