]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/12369 (ICE with templates and friends)
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Fri, 17 Oct 2003 11:14:55 +0000 (11:14 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Fri, 17 Oct 2003 11:14:55 +0000 (11:14 +0000)
PR c++/12369
* g++.dg/template/friend25.C: New test.

From-SVN: r72596

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/friend25.C [new file with mode: 0644]

index 793f785d82a647d3988e55f0f98d57af565cb94d..3f00636946fbe3da4b752250ab2e61f79e11938b 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/12369
+       * g++.dg/template/friend25.C: New test.
+
 2003-10-16  Ziemowit Laski  <zlaski@apple.com>
 
        * 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 (file)
index 0000000..fa11def
--- /dev/null
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+// Origin: Jiangbin Zhao <zhaojiangbin@yahoo.com>
+
+// PR c++/12369: ICE for specialization of member function template
+// as friend in ordinary class.
+
+struct A {
+    template<class T> T* make() { return new T(); }
+};
+struct B {
+    friend B* A::make< B >(); // (1)
+};
This page took 0.083341 seconds and 5 git commands to generate.