Hi all, this patch does various cleanups/bug fixes and it updates acc_get_property(_string) to include a spec bug fix.
Namely: (0) I added a .gitattributes file for openacc_lib.h (this is a Fortran file) as otherwise "git diff" marks the space-indentation as "wrong"/red; but ISO Fortran doesn't permit tabs outside strings and comments. (1) For Fortran, one can call procedures using the argname=<value> syntax. However, our interfaces did not match the ones in the spec. (Applies only to the _l functions, but the _h have been updated as well for consistency.) (2) Cleanup: I replaced a couple of "if (func() == 1) then; result = .true.; else; result = .false.; endif" by the simpler "result = func() /= 0". (It also uses /= 0 instead of == 1 for better C compatibility.) (3) The accelerator version of the openacc module missed one constant. And the openacc_lib.h missed a bunch of changes from the module. (4) For openacc_lib.h: I moved the "!GCC$ ATTRIBUTES" to the first column as it is otherwise not active for fixed-form Fortran. The file uses for continuation lines '&' in column 6 (for fixed form source format) and '&' in column 73 in the previous line. (Used for free-form Fortran; in standard fixed-form Fortran, col 73+ is ignored.) (5) I fixed some typos in the .texi file and corrected an argument name. (7) acc device properties support: Those were added in OpenACC 2.6 (and GCC 10). However, in a recent language spec meeting, some long-standing Fortran issues in the spec were fixed for the post-OpenACC 3.0 spec. Namely: * All kind values had the _kind suffix, but "acc_device_property" * acc_get_property returns memory sizes and the return type is size_t in C, but was "acc_device_property" in Fortran. (This function returns properties such available memory, which might easily exceed 2GB.) The new spec has acc_device_property_kind with "_kind" and acc_device_property now returns a c_size_t integer. This patch changes everything to "acc_device_property_kind" but provides "acc_device_property" for backward compatibility. It also changes acc_device_property to return c_size_t. Plus, it changes the acc_device_property_kind to a 32bit int (was c_size_t before as workaround). This changes avoids some casts in the wrapper functions to the libgomp function. Committed as obvious as Rev. r10-6721-g8d1a1cb1b816381bf60cb1211c93b8eba1fe1472 Tobias PS: Catherine and Frederik had a look at an earlier version of that patch (not posted) and made some suggestions. Thanks!