[flang-commits] [flang] [flang][coarray] Fix error fir.store mismatch memory reference type in genCoBounds #193131 (PR #194870)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Wed Apr 29 07:43:12 PDT 2026
================
@@ -60,4 +60,12 @@ program alloc_test
! CHECK: mif.dealloc_coarray %[[VAL_14]] stat %[[STAT:.*]] errmsg %[[ERRMSG:.*]] : (!fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<i32>, !fir.box<none>) -> ()
deallocate(d%z%co)
-end program
+end program
+
+! CHECK-LABEL: func.func @_QPtest_alloc2()
+subroutine test_alloc2
+ class(*),allocatable :: a[:]
+
+ ! CHECK: mif.alloc_coarray %[[VAL_1:.*]]#0 lcobounds %[[LCOBOUNDS:.*]] ucobounds %[[UCOBOUNDS:.*]] errmsg %[[ERRMSG:.*]] {uniq_name = "_QFtest_alloc2Ea"} : (!fir.ref<!fir.class<!fir.heap<none>>>, !fir.box<!fir.array<1xi64>>, !fir.box<!fir.array<0xi64>>, !fir.box<none>) -> ()
+ allocate(real::a[1:*])
----------------
eugeneepshteyn wrote:
Shouldn't there also be `allocate(real :: a[1:*], STAT=ierr)` to check for existing STAT arg?
https://github.com/llvm/llvm-project/pull/194870
More information about the flang-commits
mailing list