aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
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>();
+}