[lldb] fix fd leak during lldb testsuite (#118093)
[llvm-project.git] / flang / test / Lower / array-wide-char.f90
blob8bad280d0f0561e31d2b7b96ac971095f8e9d42a
1 ! RUN: bbc -hlfir=false %s -o - | tco | FileCheck %s
3 character(LEN=128, KIND=4), PARAMETER :: conarr(3) = &
4 [ character(128,4) :: "now is the time", "for all good men to come", &
5 "to the aid of the country" ]
6 character(LEN=10, KIND=4) :: arr(3) = &
7 [ character(10,4) :: "good buddy", "best buddy", " " ]
8 call action_on_char4(conarr)
9 call action_on_char4(arr)
10 end program
12 subroutine sub1
13 integer, parameter :: k = 4
14 character(63,k), parameter :: wiggle = k_"wiggle"
15 call sub2(wiggle)
16 end subroutine sub1
18 ! CHECK-LABEL: @_QFEarr = internal global [3 x [10 x i32]] [
19 ! CHECK-SAME: [10 x i32] [i32 103, i32 111, i32 111, i32 100, i32 32, i32 98, i32 117, i32 100, i32 100, i32 121],
20 ! CHECK-SAME: [10 x i32] [i32 98, i32 101, i32 115, i32 116, i32 32, i32 98, i32 117, i32 100, i32 100, i32 121],
21 ! CHECK-SAME: [10 x i32] [i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32, i32 32]]
22 ! CHECK-LABEL: @_QFsub1ECwiggle = internal constant [63 x i32] [i32 119,
23 ! CHECK-SAME: i32 105, i32 103, i32 103, i32 108, i32 101, i32 32, i32 32,
24 ! CHECK: @_QQcl[[inline:.*]] = linkonce constant [63 x i32] [i32 119, i32 105, i32 103, i32 103, i32 108, i32 101, i32 32,
26 ! CHECK-LABEL: define void @_QQmain()
27 ! CHECK: call void @_QPaction_on_char4(ptr @_QFEarr, i64 10)
29 ! CHECK-LABEL: define void @_QPsub1(
30 ! CHECK: call void @_QPsub2(ptr @_QQcl[[inline]], i64 63)