From 6fe0c58b9fe04b112586fe0ffecc18a24b313c50 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 26 Sep 2018 09:59:56 +0000 Subject: [PATCH] re PR c++/71131 ([concepts] Ill-formed code declaring a variable with a template concept not rejected) 2018-09-26 Paolo Carlini PR c++/71131 * g++.dg/concepts/pr71131.C: New. 2018-09-26 Paolo Carlini PR c++/71127 * g++.dg/concepts/pr71127.C: New. From-SVN: r264639 --- gcc/testsuite/ChangeLog | 10 ++++++++++ gcc/testsuite/g++.dg/concepts/pr71127.C | 6 ++++++ gcc/testsuite/g++.dg/concepts/pr71131.C | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.dg/concepts/pr71127.C create mode 100644 gcc/testsuite/g++.dg/concepts/pr71131.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 903b8c7d0cd..2533259cf9c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2018-09-26 Paolo Carlini + + PR c++/71131 + * g++.dg/concepts/pr71131.C: New. + +2018-09-26 Paolo Carlini + + PR c++/71127 + * g++.dg/concepts/pr71127.C: New. + 2018-09-26 Paolo Carlini 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 index 00000000000..3ec6514b467 --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/pr71127.C @@ -0,0 +1,6 @@ +// { dg-do compile { target c++14 } } +// { dg-additional-options "-fconcepts" } + +template class T> +concept bool C = T::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 index 00000000000..02f1999672d --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/pr71131.C @@ -0,0 +1,6 @@ +// { dg-do compile { target c++14 } } +// { dg-additional-options "-fconcepts" } + +template class T> +concept bool C = true; +C c = 1; // { dg-error "invalid reference to concept" } -- 2.30.2