https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92881
--- Comment #1 from jules at gcc dot gnu.org --- Author: jules Date: Fri Dec 13 23:14:15 2019 New Revision: 279388 URL: https://gcc.gnu.org/viewcvs?rev=279388&root=gcc&view=rev Log: Fix potential race condition in OpenACC "exit data" operations PR libgomp/92881 libgomp/ * libgomp.h (gomp_remove_var_async): Add prototype. * oacc-mem.c (delete_copyout): Call gomp_remove_var_async instead of gomp_remove_var. * target.c (gomp_unref_tgt): Change return type to bool, indicating whether target_mem_desc was unmapped. (gomp_unref_tgt_void): New. (gomp_remove_var): Reimplement in terms of... (gomp_remove_var_internal): ...this new helper function. (gomp_remove_var_async): New, implemented using above helper function. (gomp_unmap_vars_internal): Use gomp_unref_tgt_void instead of gomp_unref_tgt. Reviewed-by: Thomas Schwinge <tho...@codesourcery.com> Modified: trunk/libgomp/ChangeLog trunk/libgomp/libgomp.h trunk/libgomp/oacc-mem.c trunk/libgomp/target.c