Now committed as r15-3895-ge4a58b6f28383c.

* * *

Next step is to sent the Fortran part. While it exists, I want to proof read what I wrote a couple years back and I want to split-off the polymorphism/class part as the current implementation has some issues and OpenMP 6 decided to disallow polymorphic Fortran variables for now. (Until some corner-case behavior has been defined.)

[The existing polymorphism support works but it effectively only permits access to the declared types (as the vtable pointers will be the ones of the host), it also has some issues + as the vtable gained two functions, the ABI compatibility with old code is gone (+ hence the .mod version number was bumped).]

The entry code for the committed patch as mentioned before:

Am 10.09.24 um 12:19 schrieb Tobias Burnus:
The interesting bit are the hook entry points gfc_omp_deep_mapping_p, gfc_omp_deep_mapping_cnt, and gfc_omp_deep_mapping → https://github.com/gcc-mirror/gcc/blob/devel/omp/gcc-14/gcc/fortran/trans-openmp.cc#L3068-L3209

And I think all code is in this file, once removing the polymorphism code – and replacing it by a diagnostic message.

Tobias

PS: otherwise missing on the polymorphism side is 'private(class_var)'; 'firstprivate(class_var)' works [all as data-sharing clauses not as data-mapping clauses].

PPS: The host-pointer vtable issue could be solved as for C++ in OpenMP 5.2 by using the 'indirect' feature to lookup the device version of the table. (To be implemented for C++ and potentially for OpenMP 6.1+ (?) for Fortran.)

Reply via email to