aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-openmp.cc
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2022-04-05 08:31:34 -0700
committerChung-Lin Tang <cltang@codesourcery.com>2022-04-05 08:31:34 -0700
commitb0af8e3a502a64a0e0a04cc54ef055e5d942240f (patch)
tree6489081f39f9876d2d6b7edd33576289426d66a7 /gcc/fortran/trans-openmp.cc
parente68f5c90bae44e886bd1b13a135dbfd00bceea0a (diff)
downloadgcc-b0af8e3a502a64a0e0a04cc54ef055e5d942240f.zip
gcc-b0af8e3a502a64a0e0a04cc54ef055e5d942240f.tar.gz
gcc-b0af8e3a502a64a0e0a04cc54ef055e5d942240f.tar.bz2
OpenMP: Fix nested use_device_ptr
This patch fixes a bug in lower_omp_target, where for Fortran arrays, the expanded sender assignment is wrongly using the variable in the current ctx, instead of the one looked-up outside, which is causing use_device_ptr/addr to fail to work when used inside an omp-parallel (where the omp child_fn is split away from the original). The fix is inside omp-low.cc, though because the omp_array_data langhook is used only by Fortran, this is essentially Fortran-specific. 2022-04-05 Chung-Lin Tang <cltang@codesourcery.com> gcc/ChangeLog: * omp-low.cc (lower_omp_target): Use outer context looked-up 'var' as argument to lang_hooks.decls.omp_array_data, instead of 'ovar' from current clause. libgomp/ChangeLog: * testsuite/libgomp.fortran/use_device_ptr-4.f90: New testcase.
Diffstat (limited to 'gcc/fortran/trans-openmp.cc')
0 files changed, 0 insertions, 0 deletions