Fix-up for og12 commit
15d0f61a7fecdc8fd12857c40879ea3730f6d99f
"Merge non-contiguous array support patches".
PR other/76739
libgomp/
* oacc-parallel.c (GOACC_parallel_keyed): Given OpenACC 'async',
defer 'free' of non-contiguous array support data structures.
* target.c (gomp_map_vars_internal): Likewise.
+2023-03-24 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR other/76739
+ * oacc-parallel.c (GOACC_parallel_keyed): Given OpenACC 'async',
+ defer 'free' of non-contiguous array support data structures.
+ * target.c (gomp_map_vars_internal): Likewise.
+
2023-03-23 Tobias Burnus <tobias@codesourcery.com>
* testsuite/libgomp.fortran/map-alloc-comp-8.f90: New test.
= goacc_map_vars (acc_dev, aq, mapnum, hostaddrs, NULL, sizes, kinds,
nca_info, true, GOMP_MAP_VARS_TARGET);
- free (nca_info);
+ if (aq == NULL)
+ free (nca_info);
+ else
+ acc_dev->openacc.async.queue_callback_func (aq, free, nca_info);
if (profiling_p)
{
(nca, target_ptrblock);
gomp_copy_host2dev (devicep, aq, target_ptrblock, ptrblock,
nca->ptrblock_size, false, cbufp);
- free (ptrblock);
+ if (aq)
+ /* Free once the transfer has completed. */
+ devicep->openacc.async.queue_callback_func (aq, free, ptrblock);
+ else
+ free (ptrblock);
}
}
}