[PATCH] D86051: [flang]Add Semantic Checks for OpenMP Allocate Clause
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 06:09:16 PDT 2020
kiranchandramohan requested changes to this revision.
kiranchandramohan added a comment.
This revision now requires changes to proceed.
You missed formatting with clang-format.
Please add additional tests to ensure allocate clause is accepted in all directives where it is allowed.
More comments inline.
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:882
}
+ if(HasAllocateObject(*symbol) && !HasPrivateDataSharingAttributeObject(*symbol)){
+ context_.Say(name.source,
----------------
There are two minor issues with putting this check here,
1) I think the location of the error should be the allocate clause and not the location of the occurrence of the variable inside the region.
2) If the variable does not occur inside the parallel region then I think it is still an error as per the standard. I believe the current implementation will miss this case.
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:884
+ context_.Say(name.source,
+ "The ALLOCATE clause requires that '%s' must appear in a data-sharing "
+ "attribute clause on the same directive"_err_en_US,
----------------
This should be changed to something like "must appear in a private ...".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86051/new/
https://reviews.llvm.org/D86051
More information about the llvm-commits
mailing list