![]() This patch fixes a case where a combined directive (e.g. "!$omp target parallel ...") contains both a map and a firstprivate clause for the same variable. When the combined directive is split into two nested directives, the outer "target" gets the "map" clause, and the inner "parallel" gets the "firstprivate" clause, like so: !$omp target parallel map(x) firstprivate(x) --> !$omp target map(x) !$omp parallel firstprivate(x) ... When there is no map of the same variable, the firstprivate is distributed to both directives, e.g. for 'y' in: !$omp target parallel map(x) firstprivate(y) --> !$omp target map(x) firstprivate(y) !$omp parallel firstprivate(y) ... This is not a recent regression, but appear to fix a long-standing ICE. (The included testcase is based on one by Tobias.) 2022-12-06 Julian Brown <julian@codesourcery.com> gcc/fortran/ * trans-openmp.cc (gfc_add_firstprivate_if_unmapped): New function. (gfc_split_omp_clauses): Call above. libgomp/ * testsuite/libgomp.fortran/combined-directive-splitting-1.f90: New test. |
||
---|---|---|
.. | ||
config | ||
lib | ||
libgomp.c | ||
libgomp.c++ | ||
libgomp.c-c++-common | ||
libgomp.fortran | ||
libgomp.graphite | ||
libgomp.oacc-c | ||
libgomp.oacc-c++ | ||
libgomp.oacc-c-c++-common | ||
libgomp.oacc-fortran | ||
libgomp-site-extra.exp.in | ||
libgomp-test-support.exp.in | ||
Makefile.am | ||
Makefile.in |