OpenMP 4.5 - Variables that appear in expressions for statement function definitions may not appear in private, firstprivate or lastprivate clauses.
Test case : omp-private03.f90
Paths
| Differential D93213
[Flang] [OpenMP] Add semantic check for OpenMP private ,firstprivate and lastprivate clauses ClosedPublic Authored by praveen on Dec 14 2020, 7:09 AM.
Details Summary OpenMP 4.5 - Variables that appear in expressions for statement function definitions may not appear in private, firstprivate or lastprivate clauses. Test case : omp-private03.f90
Diff Detail
Event TimelineComment Actions "Variables that appear in namelist statements, in variable format expressions, or in expressions for statement function definitions, may not appear in a firstprivate clause." @kiranchandramohan I was not able to find the implementation for the "variable format expressions" . Do we have support for this part ? Comment Actions LGTM.
I believe "variable format expressions" are not supported so we can skip this check, This revision is now accepted and ready to land.Dec 23 2020, 3:19 PM This revision was landed with ongoing or failed builds.Dec 25 2020, 1:21 AM Closed by commit rGa2ca6bbda616: [Flang][OpenMP] Add semantic check for OpenMP Private, Firstprivate and… (authored by praveen). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 313719 flang/lib/Semantics/resolve-directives.cpp
flang/test/Semantics/omp-private03.f90
|
We have an ordering issue here. OmpAttributeVisitor (this class) is called as part of resolvenames which happens before the parse-tree rewrite. Problem is that before the parse-tree rewrite there are array expressions which are mis-parsed as statement functions. So this function will be called on a lot of statement functions which are not actually statement functions and can cause problems.