]> 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, 20 Apr 2022 14:30:40 +0000 (16:30 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 20 Apr 2022 14:30:40 +0000 (16:30 +0200)
commit6cd57652abea0162af7036ddb62c85a5e624cd1c
tree184231fd5c2932ca6980fa8e74179ad321c721b6
parentf0bde8aba15fcec3f6c07c7f05de56a3995fe9bf
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 12/mainline patch submitted at:
https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593419.html

gcc/ChangeLog:

        * omp-low.c (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.c
libgomp/testsuite/libgomp.fortran/use_device_addr-5.f90 [new file with mode: 0644]