-
- Downloads
OpenMP/Fortran: Reject not strictly nested target -> teams [PR110725, PR71065]
OpenMP requires: "If a teams region is nested inside a target region, the corresponding target construct must not contain any statements, declarations or directives outside of the corresponding teams construct." This commit checks now for this restriction. PR fortran/110725 PR middle-end/71065 gcc/fortran/ChangeLog: * gfortran.h (gfc_omp_clauses): Add contains_teams_construct. * openmp.cc (resolve_omp_target): New; check for teams nesting. (gfc_resolve_omp_directive): Call it. * parse.cc (decode_omp_directive): Set contains_teams_construct on enclosing ST_OMP_TARGET. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/pr99226.f90: Update dg-error. * gfortran.dg/gomp/teams-5.f90: New test.
Showing
- gcc/fortran/gfortran.h 1 addition, 0 deletionsgcc/fortran/gfortran.h
- gcc/fortran/openmp.cc 38 additions, 1 deletiongcc/fortran/openmp.cc
- gcc/fortran/parse.cc 33 additions, 0 deletionsgcc/fortran/parse.cc
- gcc/testsuite/gfortran.dg/gomp/pr99226.f90 1 addition, 1 deletiongcc/testsuite/gfortran.dg/gomp/pr99226.f90
- gcc/testsuite/gfortran.dg/gomp/teams-5.f90 150 additions, 0 deletionsgcc/testsuite/gfortran.dg/gomp/teams-5.f90
Loading
Please register or sign in to comment