Bug 82901 - GOACC_declare calls GOACC_enter_exit_data with async arg 0
Summary: GOACC_declare calls GOACC_enter_exit_data with async arg 0
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgomp (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: 9.0
Assignee: Not yet assigned to anyone
URL:
Keywords: openacc, patch
Depends on:
Blocks:
 
Reported: 2017-11-08 15:33 UTC by Tom de Vries
Modified: 2018-05-09 16:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Tentative patch (367 bytes, patch)
2017-11-08 15:34 UTC, Tom de Vries
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2017-11-08 15:33:16 UTC
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.
Comment 1 Tom de Vries 2017-11-08 15:34:59 UTC
Created attachment 42564 [details]
Tentative patch
Comment 3 Tom de Vries 2018-05-09 16:02:01 UTC
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
Comment 4 Tom de Vries 2018-05-09 16:03:13 UTC
marking resolved-fixed.