public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9035] c++: add fixed testcase [PR111682]
@ 2024-02-16 17:45 Patrick Palka
  0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2024-02-16 17:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c95dc611a6203f0564722975acff4ad866b9c45e

commit r14-9035-gc95dc611a6203f0564722975acff4ad866b9c45e
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri Feb 16 12:44:27 2024 -0500

    c++: add fixed testcase [PR111682]
    
    Fixed by the PR113612 fix r14-8960-g19ac327de421fe.
    
            PR c++/111682
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/cpp1y/var-templ86.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/cpp1y/var-templ86.C | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ86.C b/gcc/testsuite/g++.dg/cpp1y/var-templ86.C
new file mode 100644
index 000000000000..0c933cac26c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/var-templ86.C
@@ -0,0 +1,23 @@
+// PR c++/111682
+// { dg-do compile { target c++14 } }
+
+template<typename T> struct A {
+  template<typename U> struct B;
+  template<typename U> struct B<U*>;
+};
+template<typename T> template<typename U> struct A<T>::B<U*> {};
+template struct A<int>;
+A<int>::B<int*> b;
+
+
+template<typename T> struct B {
+  template<typename U> static const int var1;
+  template<typename U> static const int var1<U*>;
+
+  template<typename U> static const int var2;
+};
+template<typename T> template<typename U> const int B<T>::var1<U*> = 1;
+template<typename T> template<typename U> const int B<T>::var2<U*> = 1;
+template struct B<int>;
+int b_test1[B<int>::var1<int*>];
+int b_test2[B<int>::var2<int*>];

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-16 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-16 17:45 [gcc r14-9035] c++: add fixed testcase [PR111682] Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).