[flang-commits] [PATCH] D133174: [flang] Add atomic_fetch_or to the list of intrinsics
Katherine Rasmussen via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Sep 26 11:34:20 PDT 2022
ktras planned changes to this revision.
ktras added a comment.
I will updated my patch based on reviewer feedback on the implementation of one of the new errors and the implementation of the `atomic_int_kind` check.
================
Comment at: flang/lib/Evaluate/intrinsics.cpp:1593
+ } else if (ExtractCoarrayRef(*arg)) {
+ argOk = true;
+ } else {
----------------
rouson wrote:
> ktras wrote:
> > jeanPerier wrote:
> > > I am not well versed in coarrays, and the standard phrasing "shall be a scalar coarray or coindexed object" is a bit ambiguous to me. Are you sure the "scalar" part does not also apply to coindexed objects ? It is not entirely clear to me why it would apply on Corarray and not coarray references.
> > @jeanPerier, As you saw, the interpretation I took is that in that sentence in the standard, `scalar` only modifies `coarray` and not `coindexed-object`, but I am not sure that this interpretation is correct. I can see your point that this interpretation doesn't make as much sense. @rouson, can you give feedback on this coarray question? Do you know whether "shall be a scalar coarray or coindexed object" in 16.9.25 in the 2018 standard means that a `coindexed-object` shall also be `scalar`? Or just if it is a coarray?
> I debated whether "scalar" modifies just "coarray" or also "coindexed object" and concluded that the most reasonable answer is that "scalar" modifies both. Otherwise, the standard would be treating coindexed data entities differently from non-coindexed ones, which would create the odd circumstance that we could do something with coindexed entities even in //single-image// execution that we could not do with non-coindexed entities.
That is a good point about the //single-image// execution. Thank you @jeanPerier and @rouson for this discussion. I will change the way I implement my error check for that sentence in the standard to work based on the interpretation that `scalar` modifies both `coarray` and `coindexed-object`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133174/new/
https://reviews.llvm.org/D133174
More information about the flang-commits
mailing list