[gcc r15-8655] c++: add fixed test [PR119378]
Patrick Palka
ppalka@gcc.gnu.org
Fri Mar 21 19:24:12 GMT 2025
https://gcc.gnu.org/g:6ed38b98456725f042e75fde7da16c60e22c08d8
commit r15-8655-g6ed38b98456725f042e75fde7da16c60e22c08d8
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Mar 21 15:23:49 2025 -0400
c++: add fixed test [PR119378]
Fixed by r15-123 (specifically the change to set processing_template_decl
when tsubsting UNBOUND_CLASS_TEMPLATE).
PR c++/119378
gcc/testsuite/ChangeLog:
* g++.dg/template/friend85.C: New test.
Diff:
---
gcc/testsuite/g++.dg/template/friend85.C | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/gcc/testsuite/g++.dg/template/friend85.C b/gcc/testsuite/g++.dg/template/friend85.C
new file mode 100644
index 000000000000..5cf839111931
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend85.C
@@ -0,0 +1,16 @@
+// PR c++/119378
+
+template<int N>
+struct A {
+ template<class T>
+ struct B;
+};
+
+template<class U>
+struct C {
+ template<int N>
+ template<class T>
+ friend class A<N>::B;
+};
+
+template struct C<int>;
More information about the Gcc-cvs
mailing list