re PR c++/79429 (ICE in add_stmt, at cp/semantics.c:385)
authorJakub Jelinek <jakub@redhat.com>
Thu, 9 Feb 2017 14:06:58 +0000 (15:06 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 9 Feb 2017 14:06:58 +0000 (15:06 +0100)
commitf08683a154522492e2fdc9e970b145cd37f242de
tree29a9970700dafea0da06c1d96c659c945c33a8a6
parent56f71478487174d7bacbe51a9c35d23257db905e
re PR c++/79429 (ICE in add_stmt, at cp/semantics.c:385)

PR c++/79429
* parser.c (cp_parser_omp_ordered): Don't check for non-pragma_stmt
non-pragma_compound context here.
(cp_parser_omp_target): Likewise.
(cp_parser_pragma): Don't call push_omp_privatization_clauses and
parsing for ordered and target omp pragmas in non-pragma_stmt
non-pragma_compound contexts.

* c-c++-common/gomp/pr79429.c: New test.
* g++.dg/gomp/pr79429.C: New test.

From-SVN: r245303
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/pr79429.c [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/pr79429.C [new file with mode: 0644]