c++: Add new test [PR88819]
authorMarek Polacek <polacek@redhat.com>
Wed, 12 Feb 2020 16:20:07 +0000 (11:20 -0500)
committerMarek Polacek <polacek@redhat.com>
Wed, 12 Feb 2020 16:20:07 +0000 (11:20 -0500)
Fixed by r10-1975-g59febe0ece37bedab7f42ae51b9f2b7a372d2950.

2020-02-12  Marek Polacek  <polacek@redhat.com>

PR c++/88819
* g++.dg/cpp2a/nontype-class32.C: New test.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/nontype-class32.C [new file with mode: 0644]

index 968b903..e2f590b 100644 (file)
@@ -1,5 +1,10 @@
 2020-02-12  Marek Polacek  <polacek@redhat.com>
 
+       PR c++/88819
+       * g++.dg/cpp2a/nontype-class32.C: New test.
+
+2020-02-12  Marek Polacek  <polacek@redhat.com>
+
        PR c++/93684 - ICE-on-invalid with broken attribute.
        * g++.dg/parse/attr4.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C
new file mode 100644 (file)
index 0000000..6a4dac5
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/88819
+// { dg-do compile { target c++2a } }
+
+template<typename T, template<T> class TT, class R = TT <0>> struct A 
+{
+  template<R> struct B {};
+};
+template<int> struct C {};
+
+A<int, C, C<0>> a;