openmp: Fix ICE on #pragma omp parallel master in template [PR94477]
authorJakub Jelinek <jakub@redhat.com>
Fri, 3 Apr 2020 22:35:41 +0000 (00:35 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 3 Apr 2020 22:35:41 +0000 (00:35 +0200)
commit0c809f727cd2a6c70c307d9dd53d26dc84bf292a
tree2c6c49c579594101d168664f9d4a75c0d860a581
parent710d54ed4e343a08d2fa0abc6b63c53dec0d9bcb
openmp: Fix ICE on #pragma omp parallel master in template [PR94477]

The following testcase ICEs, because for parallel combined with some
other construct we initialize the omp_parallel_combined_clauses pointer
and expect the construct combined with it to clear it after it no longer
needs it, but OMP_MASTER didn't do that.

2020-04-04  Jakub Jelinek  <jakub@redhat.com>

PR c++/94477
* pt.c (tsubst_expr) <case OMP_MASTER>: Clear
omp_parallel_combined_clauses.

* g++.dg/gomp/pr94477.C: New test.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/gomp/pr94477.C [new file with mode: 0644]