]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: Fix use_device_{addr,ptr} with in-data-sharing arg
authorTobias Burnus <tobias@codesourcery.com>
Wed, 4 May 2022 16:18:44 +0000 (18:18 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 4 May 2022 16:18:44 +0000 (18:18 +0200)
commit3f8c389fe90bf565a6221a46bb7fb745dd4c1510
tree7f9d1fa9367538651022da2ab542d0272b37e1a9
parent79a1a01cbd0e4a491d7078783131e3f88ca7158d
OpenMP: Fix use_device_{addr,ptr} with in-data-sharing arg

For array-descriptor vars, the descriptor is assigned to a temporary. However,
this failed when the clause's argument was in turn in a data-sharing clause
as the outer context's VALUE_EXPR wasn't used.

gcc/ChangeLog:

* omp-low.cc (lower_omp_target): Fix use_device_{addr,ptr} with list
item that is in an outer data-sharing clause.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/use_device_addr-5.f90: New test.
gcc/omp-low.cc
libgomp/testsuite/libgomp.fortran/use_device_addr-5.f90 [new file with mode: 0644]