[gcc/devel/c++-coroutines] c++: Add new test [PR88092]

Iain D Sandoe iains@gcc.gnu.org
Thu Jan 30 21:06:00 GMT 2020


https://gcc.gnu.org/g:11ffae58473472766960b2f6c59108e331a9eba7

commit 11ffae58473472766960b2f6c59108e331a9eba7
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Jan 29 15:12:46 2020 -0500

    c++: Add new test [PR88092]
    
    This test got fixed by r10-1976-gdaaa6fcc70ffe66bd56f5819ad4ee78fecd54bb6
    so let's add it to the testsuite.
    
    	PR c++/88092
    	* g++.dg/cpp2a/nontype-class31.C: New test.

Diff:
---
 gcc/testsuite/ChangeLog                      |  5 +++++
 gcc/testsuite/g++.dg/cpp2a/nontype-class31.C | 19 +++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b62e7ef..a8d563b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-01-29  Marek Polacek  <polacek@redhat.com>
+
+	PR c++/88092
+	* g++.dg/cpp2a/nontype-class31.C: New test.
+
 2020-01-29  Jeff Law  <law@redhat.com
 
 	PR tree-optimization/89689
diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C
new file mode 100644
index 0000000..329b312
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C
@@ -0,0 +1,19 @@
+// PR c++/88092
+// { dg-do compile { target c++2a } }
+
+template<typename T>
+struct S {
+ constexpr S(...) { }
+};
+
+template <typename T> S(T) -> S<T>;
+
+template <S s> struct foo { };
+
+template <S s>
+void fn ()
+{
+  auto t = s;
+  foo<t> f1;
+  foo<s> f2;
+}



More information about the Gcc-cvs mailing list