[Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments

Tobias Burnus tobias@codesourcery.com
Wed Nov 20 13:06:00 GMT 2019


This patch does two things regarding explicit and automatical variable 
mapping to offloaded devices:

* Fixes bugs with optional arguments, which are present. They were 
mapped but the mapping had issues causing run-time failures.
* It now also handles absent optional arguments.

Compared to the previous patch set,** I added several OpenMP test cases 
– and fixed the fallout.

Except for trivial changes to libgomp/oacc-mem.c and omp-low.c, all 
changes are in fortran/trans-openmp.c and only affect optional arguments.

The patch was bootstrapped and tested on x86_64-gnu-linux w/o 
offloading-support configured and with nvptx offloading.

Tobias

** Included in the attached patch are the following previously posted 
patches: [1] the trivial libgomp/oacc-mem.c change, [2] only the 
remaining single-line change in omp-low.c, [3] the trans-openmp.c 
changes (which had to be modified+extended), and [5] the test cases. 
([2] and [4] are already in GCC 10.) See: 
https://gcc.gnu.org/ml/gcc-patches/2019-07/threads.html#00960 for the 
original patches.

PS: For full OpenMP support, (absent) optional arguments also needed to 
be handled for data-share clauses.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: optional-absent-map-v6.diff
Type: text/x-patch
Size: 61056 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20191120/6c5aba5d/attachment.bin>


More information about the Fortran mailing list