]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP/Fortran: Fix defaultmap(none) issue with dummy procedures [PR114283]
authorTobias Burnus <tburnus@baylibre.com>
Wed, 13 Mar 2024 08:35:28 +0000 (09:35 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 13 Mar 2024 08:35:28 +0000 (09:35 +0100)
commitc5037fcee2de438774466e78e46e6ab4df72a7fe
tree142d566a17a5cbe424db989221b5d204fdd50f11
parent6586359e8e4c611dd96129b5d4f24023949ac3fc
OpenMP/Fortran: Fix defaultmap(none) issue with dummy procedures [PR114283]

Dummy procedures look similar to variables but aren't - neither in Fortran
nor in OpenMP. As the middle end sees PARM_DECLs, mark them as predetermined
firstprivate for mapping (as already done in gfc_omp_predetermined_sharing).

This does not address the isses related to procedure pointers, which are
still discussed on spec level [see PR].

PR fortran/114283

gcc/fortran/ChangeLog:

* trans-openmp.cc (gfc_omp_predetermined_mapping): Map dummy
procedures as firstprivate.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/declare-target-indirect-4.f90: New test.
gcc/fortran/trans-openmp.cc
libgomp/testsuite/libgomp.fortran/declare-target-indirect-4.f90 [new file with mode: 0644]