From: Jakub Jelinek Date: Tue, 10 Oct 2017 20:09:29 +0000 (+0200) Subject: re PR c++/77578 (ICE in cp_parser_omp_for_loop (cp/parser.c:29404)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24f8d3916c6cd4e072a0eeedfb39b625cef9b0ee;p=gcc.git re PR c++/77578 (ICE in cp_parser_omp_for_loop (cp/parser.c:29404)) PR c++/77578 * g++.dg/gomp/pr77578.C: New test. From-SVN: r253612 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3d7a5348493..7e52744c9f2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-10-10 Jakub Jelinek + PR c++/77578 + * g++.dg/gomp/pr77578.C: New test. + PR middle-end/70100 * g++.dg/opt/pr70100.C: New test. diff --git a/gcc/testsuite/g++.dg/gomp/pr77578.C b/gcc/testsuite/g++.dg/gomp/pr77578.C new file mode 100644 index 00000000000..d92fddf970b --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr77578.C @@ -0,0 +1,31 @@ +// PR c++/77578 +// { dg-do compile } + +template +class A +{ +}; + +template +struct B +{ +}; + +template +struct B > +{ + typedef A C; + typedef typename C::D D; + + template + static void + foo (const D x, const D y) + { + U u; + { + #pragma omp parallel for + for (u.bar().y() = x.y(); u.bar().y() <= y.y(); u.bar().y()++) // { dg-error "expected" } + ; + } + } +};