[PATCH] D100228: [flang][OpenMP] Add semantic check for close nesting of `master` regions

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 11:08:50 PDT 2021


kiranchandramohan requested changes to this revision.
kiranchandramohan added inline comments.
This revision now requires changes to proceed.


================
Comment at: flang/lib/Semantics/check-omp-structure.h:80
+static OmpDirectiveSet nestedMasterErrSet{
+    OmpDirectiveSet{Directive::OMPD_atomic} | taskGeneratingSet | parallelSet |
+    doSet};
----------------
arnamoy10 wrote:
> kiranchandramohan wrote:
> > Why is parallelSet here? Master is allowed inside parallel.
> Good catch, updated the code and removed it.  Now the set is inspired from [[ https://github.com/llvm/llvm-project/blob/c058a7122787c8e503cf6306b8da03c0e56a41a5/flang/lib/Semantics/check-omp-structure.cpp#L215| here ]]
Can you add all those combined constructs also. Those combined constructs which will lead to a nested master violating this constraint, like parallel do.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100228/new/

https://reviews.llvm.org/D100228



More information about the llvm-commits mailing list