diff options
| author | Paul-Antoine Arras <parras@baylibre.com> | 2026-02-02 11:19:06 +0100 |
|---|---|---|
| committer | Paul-Antoine Arras <parras@baylibre.com> | 2026-02-04 19:12:14 +0100 |
| commit | 1e71ff87c97fcd37b8b98c76b684f23a17bae973 (patch) | |
| tree | 9bdc659697e768be3838dd2e5366f526e8a87acc /libjava/gnu/java/security | |
| parent | a82ca5803483043f758c6c153d5bbc80060b091c (diff) | |
| download | gcc-1e71ff87c97fcd37b8b98c76b684f23a17bae973.zip gcc-1e71ff87c97fcd37b8b98c76b684f23a17bae973.tar.gz gcc-1e71ff87c97fcd37b8b98c76b684f23a17bae973.tar.bz2 | |
OpenMP/Fortran: Fix present modifier in map clauses for allocatables
The OpenMP 6.0 spec reads (Section 7.9.6 "map Clause"):
"Unless otherwise specified, if a list item is a referencing variable then the
effect of the map clause is applied to its referring pointer and, if a
referenced pointee exists, its referenced pointee."
In other words, the map clause (and its modifiers) applies to the array
descriptor (unconditionally), and also to the array data if it is allocated.
Without this patch, the semantics enforced in libgomp is incorrect: an
allocatable is deemed present only if it is allocated. Correct semantics: an
allocatable is in the present table as long as its descriptor is mapped, even if
no data exists.
libgomp/ChangeLog:
* target.c (gomp_present_fatal): New function.
(gomp_map_vars_internal): For a Fortran allocatable array, present
causes runtime termination only if the descriptor is not mapped.
(gomp_update): Call gomp_present_fatal.
* testsuite/libgomp.fortran/map-alloc-present-1.f90: New test.
Diffstat (limited to 'libjava/gnu/java/security')
0 files changed, 0 insertions, 0 deletions
