openmp: Fix handling of non-addressable shared scalars in parallel nested inside...
commitfdaf101b1dd46d6673a318139e9620c068f45a12
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Feb 2020 13:18:10 +0000 (14 14:18 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 14 Feb 2020 15:01:48 +0000 (14 16:01 +0100)
tree4aecf344fb8c0dc406dde1fdc142c680b05d95bd
parent5781600c42f3ed9860a804dbbf892392bea3e39d
openmp: Fix handling of non-addressable shared scalars in parallel nested inside of target [PR93515]

As the following testcase shows, we need to consider even target to be a construct
that forces not to use copy in/out for shared on parallel inside of the target.
E.g. for parallel nested inside another parallel or host teams, we already avoid
copy in/out and we need to treat target the same.

2020-02-06  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/93515
* omp-low.c (use_pointer_for_field): For nested constructs, also
look for map clauses on target construct.
(scan_omp_1_stmt) <case GIMPLE_OMP_TARGET>: Bump temporarily
taskreg_nesting_level.

* testsuite/libgomp.c-c++-common/pr93515.c: New test.
gcc/ChangeLog
gcc/omp-low.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c-c++-common/pr93515.c [new file with mode: 0644]