[PATCH] D133174: [flang] Add atomic_fetch_or to the list of intrinsics

Damian Rouson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 26 11:23:00 PDT 2022


rouson added inline comments.


================
Comment at: flang/lib/Evaluate/intrinsics.cpp:1593
+        } else if (ExtractCoarrayRef(*arg)) {
+          argOk = true;
+        } else {
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133174



More information about the llvm-commits mailing list