]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]
authorJakub Jelinek <jakub@redhat.com>
Tue, 1 Dec 2020 20:41:44 +0000 (21:41 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 6 Jan 2021 09:38:35 +0000 (10:38 +0100)
commitd62daad11b21a2ee9c39a43c5e94e7b966793dbd
tree1de0985e3a68575438c86489e2a5a294d0336a26
parentebc8606a9408623e2fa2a02a5526b882ffd0e7a8
openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]

Since r11-5430 we ICE on the following testcase.  When parsing the depobj
directive we don't really use cp_parser_omp_all_clauses routine which ATM
disables generation of location wrappers and the newly added assertion
that there are no location wrappers thus triggers.

Fixed by adding the location wrappers suppression sentinel.

Longer term, we should handle location wrappers inside of OpenMP clauses.

2020-12-01  Jakub Jelinek  <jakub@redhat.com>

PR c++/98072
* parser.c (cp_parser_omp_depobj): Suppress location wrappers when
parsing depend clause.

* c-c++-common/gomp/depobj-2.c: New test.

(cherry picked from commit 91ddf867a57b028ab322b737ea8355d5a472cd44)
gcc/cp/parser.c
gcc/testsuite/c-c++-common/gomp/depobj-2.c [new file with mode: 0644]