aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2024-07-29 11:40:38 +0200
committerTobias Burnus <tburnus@baylibre.com>2024-07-29 11:40:38 +0200
commit14c47e7eb06e8b95913794f6059560fc2fa6de91 (patch)
tree2370fc93479e8fe161b6fe816e83c0f3295aa032 /gcc/tree-vectorizer.h
parentb3176b620ff29a06c90992ca3d29f3cffd459537 (diff)
downloadgcc-14c47e7eb06e8b95913794f6059560fc2fa6de91.zip
gcc-14c47e7eb06e8b95913794f6059560fc2fa6de91.tar.gz
gcc-14c47e7eb06e8b95913794f6059560fc2fa6de91.tar.bz2
libgomp: Fix declare target link with offset array-section mapping [PR116107]
Assume that 'int var[100]' is 'omp declare target link(var)'. When now mapping an array section with offset such as 'map(to:var[20:10])', the device-side link pointer has to store &<device-storage-data>[0] minus the offset such that var[20] will access <device-storage-data>[0]. But the offset calculation was missed such that the device-side 'var' pointed to the first element of the mapped data - and var[20] points beyond at some invalid memory. PR middle-end/116107 libgomp/ChangeLog: * target.c (gomp_map_vars_internal): Honor array mapping offsets with declare-target 'link' variables. * testsuite/libgomp.c-c++-common/target-link-2.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions