[flang-commits] [flang] [Flang][MIF] Allocation of NON-ALLOCATABLE SAVE coarray (PR #205847)
Jean-Didier PAILLEUX via flang-commits
flang-commits at lists.llvm.org
Fri Jul 3 02:07:11 PDT 2026
================
@@ -1,8 +1,75 @@
-! RUN: not %flang_fc1 -emit-hlfir -fcoarray %s -o - 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-hlfir -fcoarray %s -o - 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -emit-llvm -fcoarray %s -o - 2>&1 | FileCheck %s --check-prefix=LLVM
-!CHECK: not yet implemented: coarray: non-ALLOCATABLE SAVE coarray outside the main program
+! LLVM: llvm.global_ctors = appending global [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @__mif_initialization, ptr null }, { i32, ptr, ptr } { i32 1, ptr @__mif_save_coarrays_allocate, ptr null }]
subroutine test_coarray_save()
implicit none
real, SAVE :: n[*]
+ real, SAVE :: m[*]
+ real, SAVE :: p[*]
----------------
JDPailleux wrote:
TODO added and this will be treated in a next PR
https://github.com/llvm/llvm-project/pull/205847
More information about the flang-commits
mailing list