From 79572cb19be18c26f3558f070bbca94e1fcb6230 Mon Sep 17 00:00:00 2001
From: Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Date: Sun, 3 Aug 2003 09:42:00 +0000
Subject: [PATCH] re PR c++/9453 (ICE in is_specialization_of, at cp/pt.c:860)

	PR c++/9453
	* g++.dg/template/friend15.C: New test.

From-SVN: r70115
---
 gcc/testsuite/ChangeLog                  |  5 +++++
 gcc/testsuite/g++.dg/template/friend15.C | 19 +++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/template/friend15.C

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index de8342ca9e7..e1fa217f1fc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+	PR c++/9453
+	* g++.dg/template/friend15.C: New test.
+
 2003-08-03  Neil Booth  <neil@daikokuya.co.uk>
 
 	* lib/dg-pch.exp: Work round PCH bug.
diff --git a/gcc/testsuite/g++.dg/template/friend15.C b/gcc/testsuite/g++.dg/template/friend15.C
new file mode 100644
index 00000000000..4acbf2d1a56
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend15.C
@@ -0,0 +1,19 @@
+// { dg-do compile }
+
+// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/9453
+// Access checking when template friend is defined in class.
+
+template <typename> class X {
+  private:
+    struct Inner;
+
+    template <typename R>
+    friend typename X<R>::Inner * foo () { return 0; }
+};
+template class X<void>;
+
+struct U {
+    void bar () { foo<void> (); }
+};