re PR c++/71131 ([concepts] Ill-formed code declaring a variable with a template...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 26 Sep 2018 09:59:56 +0000 (09:59 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 26 Sep 2018 09:59:56 +0000 (09:59 +0000)
2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71131
* g++.dg/concepts/pr71131.C: New.

2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71127
* g++.dg/concepts/pr71127.C: New.

From-SVN: r264639

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/pr71127.C [new file with mode: 0644]
gcc/testsuite/g++.dg/concepts/pr71131.C [new file with mode: 0644]

index 903b8c7d0cdf53172809762e405d4f0a295f4030..2533259cf9c644c7f262a21aa3caf6e3a45960ba 100644 (file)
@@ -1,3 +1,13 @@
+2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/71131
+       * g++.dg/concepts/pr71131.C: New.
+
+2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/71127
+       * g++.dg/concepts/pr71127.C: New.
+
 2018-09-26  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/67655
diff --git a/gcc/testsuite/g++.dg/concepts/pr71127.C b/gcc/testsuite/g++.dg/concepts/pr71127.C
new file mode 100644 (file)
index 0000000..3ec6514
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++14 } }
+// { dg-additional-options "-fconcepts" }
+
+template<template<typename> class T>
+concept bool C = T<int>::value;
+C c = 1;  // { dg-error "invalid reference to concept" }
diff --git a/gcc/testsuite/g++.dg/concepts/pr71131.C b/gcc/testsuite/g++.dg/concepts/pr71131.C
new file mode 100644 (file)
index 0000000..02f1999
--- /dev/null
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++14 } }
+// { dg-additional-options "-fconcepts" }
+
+template<template<typename> class T>
+concept bool C = true;
+C c = 1;  // { dg-error "invalid reference to concept" }