[flang-commits] [flang] [Flang][MIF] Adding support of intrinsics with coarray argument (PR #192944)
Jean-Didier PAILLEUX via flang-commits
flang-commits at lists.llvm.org
Fri May 29 06:07:19 PDT 2026
================
@@ -0,0 +1,14 @@
+! RUN: %flang_fc1 -emit-hlfir -fcoarray %s -o - | FileCheck %s
+
+program test
+ integer :: res(3)
+ integer(kind=8) :: res2(3)
+ integer :: a[2,3:5,*]
+
+ ! CHECK: mif.coshape coarray %[[COARRAY:.*]]#0 : (!fir.ref<i32>) -> !fir.box<!fir.array<?xi64>>
+ res = coshape(a)
+
+ ! CHECK: mif.coshape coarray %[[COARRAY:.*]]#0 : (!fir.ref<i32>) -> !fir.box<!fir.array<?xi64>>
+ res2 = coshape(a)
----------------
JDPailleux wrote:
The value of the KIND argument is already reflected in the resultType in IntrinsicCall. Giving this parameter give nothing more in the FIR. So do we really need to add this case ? Or is it a simply matter of ensuring that no erros are generated ?
https://github.com/llvm/llvm-project/pull/192944
More information about the flang-commits
mailing list