Fortran: Fixes for OpenMP loop-iter privatization (PRs 95109 + 94690)
authorTobias Burnus <tobias@codesourcery.com>
Wed, 9 Sep 2020 07:33:51 +0000 (09:33 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 9 Sep 2020 07:33:51 +0000 (09:33 +0200)
commit61c2d476a52bb108bd05d0226c5522bf0c4b24b5
tree77831ed52a09f74543818b2c7404420fb07d29e3
parentf56f1a5a755e4f2080ff709ad7bf4088b84faefe
Fortran: Fixes for OpenMP loop-iter privatization (PRs 95109 + 94690)

This commit also fixes a gfortran.dg/gomp/target1.f90 regression;
target1.f90 tests the resolve.c and openmp.c changes.

gcc/fortran/ChangeLog:

PR fortran/95109
PR fortran/94690
* resolve.c (gfc_resolve_code): Also call
gfc_resolve_omp_parallel_blocks for 'distribute parallel do (simd)'.
* openmp.c (gfc_resolve_omp_parallel_blocks): Handle it.
(gfc_resolve_do_iterator): Remove special code for SIMD, which is
not needed.
* trans-openmp.c (gfc_trans_omp_target): For TARGET_PARALLEL_DO_SIMD,
call simd not do processing function.

gcc/testsuite/ChangeLog:

PR fortran/95109
PR fortran/94690
* gfortran.dg/gomp/combined-if.f90: Update scan-tree-dump-times for
'omp simd.*if'.
* gfortran.dg/gomp/openmp-simd-5.f90: New test.
gcc/fortran/openmp.c
gcc/fortran/resolve.c
gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/gomp/combined-if.f90
gcc/testsuite/gfortran.dg/gomp/openmp-simd-5.f90 [new file with mode: 0644]