[patch][OpenMP,Fortran] Fix trans-openmp.c, add use_device_addr run-time test case (has known issues with actual offloading)
Tobias Burnus
tobias@codesourcery.com
Fri Oct 4 13:54:00 GMT 2019
This use_device_addr patch does:
* Add trivial but crucial missing change to "fortran/trans-openmp.c (Ups!)
* Add a comprehensive set of test cases (only scalars and
non-array-descriptor arrays)
Remarks:
* The test cases are known to mishandle "cc/dd/ee/ff" (= scalars with
allocatable + pointer attribute). That's only visible with actual
offloading as with shared memory the errors cancel and it works.
* OpenMP spec: As the test case shows, "is_device_ptr" with
"type(c_ptr), VALUE" would be nice; but OpenMP's spec for is_device_ptr
only permits dummy arguments without VALUE attribute.
* Known shortcomings (omp-low.c implementation; not tested for): arrays
with descriptor (alloctable/pointer arrays), absent optional variables,
polymorphic variables. [For the first two, draft patches exist.]
Comments, esp. to the test case?
Tobias
PS: My next planned task is to fix the "scalars with allocatable +
pointer attribute" issue revealed in this case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_device_addr_fix-testcase.diff
Type: text/x-patch
Size: 47018 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191004/80369efe/attachment.bin>
More information about the Gcc-patches
mailing list