Add caveat/safeguard to OpenMP: Handle descriptors in target's firstprivate [PR104949]
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 23 Mar 2023 11:32:35 +0000 (12:32 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 24 Mar 2023 16:14:54 +0000 (17:14 +0100)
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.

libgomp/target.c

index 90b4204133a7559d37f72e181e640c5ef3acad13..b30c6a50c7e24bdef11f6f235cf758f097cccb16 100644 (file)
@@ -1396,6 +1396,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;