[flang-commits] [flang] [Flang][MIF] Adding support of intrinsics with coarray argument (PR #192944)
Dan Bonachea via flang-commits
flang-commits at lists.llvm.org
Thu Apr 23 20:46:02 PDT 2026
================
@@ -118,6 +120,124 @@ def mif_ThisImageOp : mif_Op<"this_image", [AttrSizedOperandSegments]> {
}];
}
+//===----------------------------------------------------------------------===//
+// Coarray Queries
+//===----------------------------------------------------------------------===//
+
+def mif_ImageIndexOp : mif_Op<"image_index", [AttrSizedOperandSegments]> {
+ let summary = "Image index from cosubscripts.";
+ let description = [{
+ Arguments:
+ - `coarray`: Shall be a coarray of any type.
+ - `sub`: rank-one integer array of size equal to the corank of `coarray`.
+ - `team`: Shall be a scalar of type `team_type` from ISO_FORTRAN_ENV.
+ - `team_number`: It shall identify the initial team or a sibling team
+ of the current team.
+
+ Usage:
+ - Case(1) : `call image_index(coarray, sub)`
+ - Case(2) : `call image_index(coarray, sub, team)`
+ - Case(3) : `call image_index(coarray, sub, team_number)`
----------------
bonachea wrote:
`image_index` is a transformational function, there is no `call`
```suggestion
- Case(1) : `image_index(coarray, sub)`
- Case(2) : `image_index(coarray, sub, team)`
- Case(3) : `image_index(coarray, sub, team_number)`
```
https://github.com/llvm/llvm-project/pull/192944
More information about the flang-commits
mailing list