GOACC_enter_exit_data has this prototype: ... void GOACC_enter_exit_data (int device, size_t mapnum, void **hostaddrs, size_t *sizes, unsigned short *kinds, int async, int num_waits, ...) ... And GOACC_declare calls GOACC_enter_exit_data with async arg 0: ... case GOMP_MAP_DELETE: GOACC_enter_exit_data (device, 1, &hostaddrs[i], &sizes[i], &kinds[i], 0, 0); ... Async arg zero means the first async queue. The declare directive has no async clause, so the arg should be GOMP_ASYNC_SYNC.
Created attachment 42564 [details] Tentative patch
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01430.html
Author: vries Date: Wed May 9 16:01:30 2018 New Revision: 260085 URL: https://gcc.gnu.org/viewcvs?rev=260085&root=gcc&view=rev Log: [openacc, libgomp] Use GOMP_ASYNC_SYNC in GOACC_declare 2018-05-09 Tom de Vries <tom@codesourcery.com> PR libgomp/82901 * oacc-parallel.c (GOACC_declare): Use GOMP_ASYNC_SYNC as async argument to GOACC_enter_exit_data. Modified: trunk/libgomp/ChangeLog trunk/libgomp/oacc-parallel.c
marking resolved-fixed.