From: Kriang Lerdsuwanakij Date: Fri, 17 Oct 2003 11:14:55 +0000 (+0000) Subject: re PR c++/12369 (ICE with templates and friends) X-Git-Tag: releases/gcc-3.4.0~2953 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e77b95a2cf214e041e3efbd0fff52207809c1dc4;p=thirdparty%2Fgcc.git re PR c++/12369 (ICE with templates and friends) PR c++/12369 * g++.dg/template/friend25.C: New test. From-SVN: r72596 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 793f785d82a6..3f00636946fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-10-17 Kriang Lerdsuwanakij + + PR c++/12369 + * g++.dg/template/friend25.C: New test. + 2003-10-16 Ziemowit Laski * objc.dg/try-catch-2.m: Relax target triple to all Darwin diff --git a/gcc/testsuite/g++.dg/template/friend25.C b/gcc/testsuite/g++.dg/template/friend25.C new file mode 100644 index 000000000000..fa11defc21ae --- /dev/null +++ b/gcc/testsuite/g++.dg/template/friend25.C @@ -0,0 +1,14 @@ +// { dg-do compile } + +// Origin: Jiangbin Zhao + +// PR c++/12369: ICE for specialization of member function template +// as friend in ordinary class. + +struct A { + template T* make() { return new T(); } +}; + +struct B { + friend B* A::make< B >(); // (1) +};