https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72741
--- Comment #14 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- Author: tschwinge Date: Thu Mar 21 20:13:44 2019 New Revision: 269858 URL: https://gcc.gnu.org/viewcvs?rev=269858&root=gcc&view=rev Log: [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. Added: trunk/gcc/testsuite/c-c++-common/goacc/routine-3-extern.c - copied, changed from r269857, trunk/gcc/testsuite/c-c++-common/goacc/routine-3.c trunk/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c - copied, changed from r269857, trunk/gcc/testsuite/c-c++-common/goacc/routine-4.c trunk/gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-1.f trunk/gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f trunk/gcc/testsuite/gfortran.dg/goacc/routine-module-3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/openmp.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/goacc/routine-3.c trunk/gcc/testsuite/c-c++-common/goacc/routine-4.c