diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-03-23 12:32:35 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-03-24 17:20:47 +0100 |
commit | 5bb50fb4e8fd10b4f6180e756380161c1ffd8a3e (patch) | |
tree | 21bd143e8a0db4ac1409e841eb4430abfd00b194 | |
parent | c276fa0616eb79ddc4d0245e775a841e84cbb7dd (diff) | |
download | gcc-5bb50fb4e8fd10b4f6180e756380161c1ffd8a3e.zip gcc-5bb50fb4e8fd10b4f6180e756380161c1ffd8a3e.tar.gz gcc-5bb50fb4e8fd10b4f6180e756380161c1ffd8a3e.tar.bz2 |
Add caveat/safeguard to OpenMP: Handle descriptors in target's firstprivate [PR104949]
Follow-up to commit 49d1a2f91325fa8cc011149e27e5093a988b3a49
"OpenMP: Handle descriptors in target's firstprivate [PR104949]".
PR fortran/104949
libgomp/
* target.c (gomp_map_vars_internal) <GOMP_MAP_FIRSTPRIVATE>: Add
caveat/safeguard.
(cherry picked from commit e8fec6998b656dac02d4bc6c69b35a0fb5611e87)
-rw-r--r-- | libgomp/ChangeLog.omp | 7 | ||||
-rw-r--r-- | libgomp/target.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index fb352b3..63d1f56 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,12 @@ 2023-03-24 Thomas Schwinge <thomas@codesourcery.com> + Backported from master: + 2023-03-24 Thomas Schwinge <thomas@codesourcery.com> + + PR fortran/104949 + * target.c (gomp_map_vars_internal) <GOMP_MAP_FIRSTPRIVATE>: Add + caveat/safeguard. + * target.c (gomp_target_rev): Instead of 'dev_to_host_cpy', 'host_to_dev_cpy', 'token', take a single 'goacc_asyncqueue'. * libgomp.h (gomp_target_rev): Adjust. diff --git a/libgomp/target.c b/libgomp/target.c index 2f53f05..de3facb 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -1482,6 +1482,11 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep, { uintptr_t target = (uintptr_t) hostaddrs[i]; void *devptr = *(void**) hostaddrs[i+1] + sizes[i+1]; + /* Per + <https://inbox.sourceware.org/gcc-patches/87o7pe12ke.fsf@euler.schwinge.homeip.net> + "OpenMP: Handle descriptors in target's firstprivate [PR104949]" + this probably needs revision for 'aq' usage. */ + assert (!aq); gomp_copy_host2dev (devicep, aq, devptr, &target, sizeof (void *), false, cbufp); ++i; |