diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-04-29 11:11:37 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-04-29 11:11:37 +0200 |
commit | 1b462deabf70e0f4bebb1f85118827d9c2eeffb5 (patch) | |
tree | ebf9101771dff41bf9e4782ded4a8fc67a198797 /gcc/builtins.c | |
parent | c57a8aea0c3ab8394f7dbfa417ee27b4613f63b7 (diff) | |
download | gcc-1b462deabf70e0f4bebb1f85118827d9c2eeffb5.zip gcc-1b462deabf70e0f4bebb1f85118827d9c2eeffb5.tar.gz gcc-1b462deabf70e0f4bebb1f85118827d9c2eeffb5.tar.bz2 |
c++: Fix up detach clause vs. data-sharing clause checking [PR100319]
The standard says that "The event-handle will be considered as if it
was specified on a firstprivate clause." which means that it can't
be explicitly specified in some other data-sharing clause.
The checking is implemented correctly for C, but for C++ when detach_seen
is true (i.e. the construct had detach clause) we were comparing
OMP_CLAUSE_DECL (c) with t, which was previously initialized to
OMP_CLAUSE_DECL (c), which means it complained about any explicit
data-sharing clause on the same construct with a detach clause.
Fixed by remembering the detach clause in detach_seen (instead of a boolean
flag) and comparing against its OMP_CLAUSE_DECL.
2021-04-29 Jakub Jelinek <jakub@redhat.com>
PR c++/100319
* semantics.c (finish_omp_clauses): Fix up check that variable
mentioned in detach clause doesn't appear in data-sharing clauses.
* c-c++-common/gomp/task-detach-3.c: New test.
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions