[PR72741] Properly handle clauses specifying the level of parallelism for 'external...
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 21 Mar 2019 20:13:44 +0000 (21:13 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Thu, 21 Mar 2019 20:13:44 +0000 (21:13 +0100)
commit2e4182ae07e16f30b8917af3c0581a6c8af31357
tree5742c92f31f9bcc01fcd42222b7d0761eda5f2c9
parentf6bf4bc14d8ab24acad0b0d42cde5e08d1c3a879
[PR72741] Properly handle clauses specifying the level of parallelism for 'external' Fortran OpenACC routines

..., so as to also for these enable the generic middle end OMP code to verify
proper nesting of loops/routines regarding their levels of parallelism.

gcc/fortran/
PR fortran/72741
* openmp.c (gfc_match_oacc_routine): Set the level of parallelism
for all variants.
(gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
gcc/testsuite/
PR fortran/72741
* c-c++-common/goacc/routine-3-extern.c: New file.
* c-c++-common/goacc/routine-3.c: Adjust.
* c-c++-common/goacc/routine-4-extern.c: New file.
* c-c++-common/goacc/routine-4.c: Adjust.
* gfortran.dg/goacc/routine-module-3.f90: New file.
* gfortran.dg/goacc/routine-external-level-of-parallelism-1.f: New
file.
* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
Likewise.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r269858
gcc/fortran/ChangeLog
gcc/fortran/openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/goacc/routine-3-extern.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/goacc/routine-3.c
gcc/testsuite/c-c++-common/goacc/routine-4-extern.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/goacc/routine-4.c
gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-1.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/routine-module-3.f90 [new file with mode: 0644]