From: Paolo Carlini Date: Mon, 30 Oct 2017 22:41:21 +0000 (+0000) Subject: re PR c++/67595 (concepts code causes segfault) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77efd154f33154e819186de79687ea55552139f4;p=gcc.git re PR c++/67595 (concepts code causes segfault) 2017-10-30 Paolo Carlini PR c++/67595 * g++.dg/concepts/pr67595.C: New. From-SVN: r254245 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e17c94dc535..33aaba8bcd1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-30 Paolo Carlini + + PR c++/67595 + * g++.dg/concepts/pr67595.C: New. + 2017-10-30 Paul Thomas PR fortran/80850 diff --git a/gcc/testsuite/g++.dg/concepts/pr67595.C b/gcc/testsuite/g++.dg/concepts/pr67595.C new file mode 100644 index 00000000000..63162fb4c72 --- /dev/null +++ b/gcc/testsuite/g++.dg/concepts/pr67595.C @@ -0,0 +1,13 @@ +// { dg-options "-std=c++17 -fconcepts" } + +template concept bool allocatable = requires{{new X}->X * }; +template concept bool semiregular = allocatable; +template concept bool readable = requires{requires semiregular}; +template int weak_input_iterator = requires{{0}->readable}; +template bool input_iterator{weak_input_iterator}; +template bool forward_iterator{input_iterator}; +template bool bidirectional_iterator{forward_iterator}; +template +concept bool random_access_iterator{bidirectional_iterator}; +void fn1(random_access_iterator); +int main() { fn1(0); } // { dg-error "" }