[flang-commits] [PATCH] D89583: [Flang][OpenMP] Semantic checks for Atomic construct.
Valentin Clement via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Oct 21 11:43:06 PDT 2020
clementval added inline comments.
================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:515
+ context_.Say(clause->source,
+ "Clause ACQUIRE is not allowed on the ATOMIC directive"_err_en_US);
+ }
----------------
sameeranjoshi wrote:
> clementval wrote:
> > Why is there a specific check for this? If it is not allowed it should not be in `OMP.td` and then catch be `CheckAllowed` in enter acquire.
> Standard says:
> `If atomic-clause is update or not present then memory-order-clause must not be acq_rel or acquire.`
>
> I couldn't use `CheckNotAllowedIfClause` here reason being there is no `OMPC_atomic`.
> I see `OMPC_atomic_default_mem_order` but I doubt it's the same what I was trying to find.
>
> also `aquire` `acq_rel` are not allowed only here they might be allowed somewhere else, hence changing them in `OMP.td` would affect other atomic directives as well.
Then the check for update is missing? and it will fail for atomic read even it should be allowed?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89583/new/
https://reviews.llvm.org/D89583
More information about the flang-commits
mailing list