From 24f8d3916c6cd4e072a0eeedfb39b625cef9b0ee Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 10 Oct 2017 22:09:29 +0200 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/g++.dg/gomp/pr77578.C | 31 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 gcc/testsuite/g++.dg/gomp/pr77578.C 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" } + ; + } + } +}; -- 2.30.2