1 ! RUN: bbc -hlfir=false -o - %s | FileCheck %s
4 integer, parameter :: preconnected_unit(3) = [0, 5, 6]
6 ! CHECK-LABEL: _QMunitsPis_preconnected_unit
7 logical function is_preconnected_unit(u
)
8 ! CHECK: [[units_ssa:%[0-9]+]] = fir.address_of(@_QMunitsECpreconnected_unit) : !fir.ref<!fir.array<3xi32>>
11 is_preconnected_unit
= .true
.
12 do i
= lbound(preconnected_unit
,1), ubound(preconnected_unit
,1)
13 ! CHECK: fir.coordinate_of [[units_ssa]]
14 if (preconnected_unit(i
) == u
) return
16 is_preconnected_unit
= .false
.
20 ! CHECK-LABEL: _QPcheck_units
21 subroutine check_units
24 if (is_preconnected_unit(i
)) print*, i
28 ! CHECK-LABEL: _QPzero
30 complex, parameter :: a(0) = [(((k
,k
=1,10),j
=-2,2,-1),i
=2,-2,-2)]
31 complex, parameter :: b(0) = [(7,i
=3,-3)]
32 ! CHECK: fir.address_of(@_QQro.0xz4.null.0) : !fir.ref<!fir.array<0xcomplex<f32>>>
38 ! CHECK-LABEL: _QQmain
44 ! CHECK: fir.global internal @_QFzeroECa constant : !fir.array<0xcomplex<f32>>
45 ! CHECK: %0 = fir.undefined !fir.array<0xcomplex<f32>>
46 ! CHECK: fir.has_value %0 : !fir.array<0xcomplex<f32>>