[PATCH] D106335: [flang][OpenMP] Add semantic check for teams nesting
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 20 04:20:47 PDT 2021
clementval requested changes to this revision.
clementval added inline comments.
This revision now requires changes to proceed.
================
Comment at: flang/lib/Semantics/check-directive-structure.h:212
+ void EnterTargetBlockOnlyTeams() { targetBlockOnlyTeams_ = true; }
+
----------------
This is only for OpenMP so it should be moved to `check-omp-structure.h`. Same for the two functions below. The `check-directive-structure.h` is meant to be shared bewteen OpenMP and OpenACC.
================
Comment at: flang/test/Semantics/omp-firstprivate01.f90:15
+ !ERROR: TARGET construct with nested TEAMS region contains statements outside of the TEAMS construct
!$omp target
----------------
Which statement is outside?
================
Comment at: flang/test/Semantics/omp-nested-master.f90:90
do i = 1, 10
+ !ERROR: TEAMS region can only be strictly nested within the implicit parallelregion or TARGET region
!$omp teams
----------------
parallel region instead of parallelregion
================
Comment at: flang/test/Semantics/omp-nested-master.f90:106
do i = 1, 10
+ !ERROR: TEAMS region can only be strictly nested within the implicit parallelregion or TARGET region
!$omp teams
----------------
Missing a space here as well.
================
Comment at: flang/test/Semantics/omp-nested-master.f90:122
do i = 1, 10
+ !ERROR: TEAMS region can only be strictly nested within the implicit parallelregion or TARGET region
!$omp teams
----------------
Missing space
================
Comment at: flang/test/Semantics/omp-nested-master.f90:139
do i = 1, 10
+ !ERROR: TEAMS region can only be strictly nested within the implicit parallelregion or TARGET region
!$omp teams
----------------
Missing space
================
Comment at: flang/test/Semantics/omp-nested-simd.f90:45
!ERROR: The only OpenMP constructs that can be encountered during execution of a 'SIMD' region are the `ATOMIC` construct, the `LOOP` construct, the `SIMD` construct and the `ORDERED` construct with the `SIMD` clause.
+ !ERROR: TEAMS region can only be strictly nested within the implicit parallelregion or TARGET region
!$omp teams
----------------
Missing space
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106335/new/
https://reviews.llvm.org/D106335
More information about the llvm-commits
mailing list