aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2019-04-04 15:49:30 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2019-04-04 15:49:30 +0000
commit3a36c1806aa3d06301d1a177afbad6198b0f9086 (patch)
treeae1c065f086776da7f64d788b535966650cc8675 /gcc
parenta7f70a0925d510d2579f6c20bf056e30664ef0f6 (diff)
downloadgcc-3a36c1806aa3d06301d1a177afbad6198b0f9086.zip
gcc-3a36c1806aa3d06301d1a177afbad6198b0f9086.tar.gz
gcc-3a36c1806aa3d06301d1a177afbad6198b0f9086.tar.bz2
re PR c++/65619 (friend declaration with template template parameter not recognized)
2019-04-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/65619 * g++.dg/template/friend67.C: New. From-SVN: r270146
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/friend67.C26
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0363d1f..7afa590 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2019-04-04 Paolo Carlini <paolo.carlini@oracle.com>
+ PR c++/65619
+ * g++.dg/template/friend67.C: New.
+
+2019-04-04 Paolo Carlini <paolo.carlini@oracle.com>
+
PR c++/61327
* g++.dg/cpp0x/friend4.C: New.
* g++.dg/cpp0x/friend5.C: Likewise.
diff --git a/gcc/testsuite/g++.dg/template/friend67.C b/gcc/testsuite/g++.dg/template/friend67.C
new file mode 100644
index 0000000..2d516b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend67.C
@@ -0,0 +1,26 @@
+// PR c++/65619
+
+template <class>
+class foo
+{
+ int i;
+
+ template <template <class> class T>
+ friend foo<T<int> > func();
+};
+
+template <template <class> class T>
+foo<T<int> > func()
+{
+ foo<T<int> > f;
+ f.i = 3;
+ return f;
+}
+
+template <class>
+struct test {};
+
+int main()
+{
+ func<test>();
+}