33
44module test_dinit
55 type t
6- integer :: i = 42
6+ integer :: i = 42
77 end type
88 type t_alloc_comp
99 real , allocatable :: i(:)
1010 end type
1111 type tseq
1212 sequence
13- integer :: i = 42
13+ integer :: i = 42
1414 end type
1515contains
1616
@@ -26,7 +26,7 @@ subroutine local
2626 ! CHECK: fir.copy %[[ADDR]] to %[[x]] no_overlap : !fir.ref<!fir.type<_QMtest_dinitTt{i:i32}>>, !fir.ref<!fir.type<_QMtest_dinitTt{i:i32}>>
2727 type (t) :: x
2828 print * , x% i
29- end subroutine
29+ end subroutine
3030
3131 ! Test local array is default initialized
3232 ! CHECK-LABEL: func @_QMtest_dinitPlocal_array()
@@ -38,7 +38,7 @@ subroutine local_array()
3838 ! CHECK: fir.call @_FortranAInitialize(%[[xboxNone]], %{{.*}}, %{{.*}}) {{.*}}: (!fir.box<none>, !fir.ref<i8>, i32) -> ()
3939 type (t) :: x(4 )
4040 print * , x(2 )% i
41- end subroutine
41+ end subroutine
4242
4343 ! Test allocatable component triggers default initialization of local
4444 ! scalars.
@@ -48,7 +48,7 @@ subroutine local_alloc_comp
4848 ! CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QMtest_dinitTt_alloc_comp.DerivedInit) : !fir.ref<!fir.type<_QMtest_dinitTt_alloc_comp{i:!fir.box<!fir.heap<!fir.array<?xf32>>>}>>
4949 ! CHECK: fir.copy %[[ADDR]] to %[[x]] no_overlap : !fir.ref<!fir.type<_QMtest_dinitTt_alloc_comp{i:!fir.box<!fir.heap<!fir.array<?xf32>>>}>>, !fir.ref<!fir.type<_QMtest_dinitTt_alloc_comp{i:!fir.box<!fir.heap<!fir.array<?xf32>>>}>>
5050 type (t_alloc_comp) :: x
51- end subroutine
51+ end subroutine
5252
5353 ! Test function results are default initialized.
5454 ! CHECK-LABEL: func @_QMtest_dinitPresult() -> !fir.type<_QMtest_dinitTt{i:i32}>
@@ -110,7 +110,7 @@ subroutine local_eq2()
110110 ! CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QMtest_dinitTtseq.DerivedInit) : !fir.ref<!fir.type<_QMtest_dinitTtseq{i:i32}>>
111111 ! CHECK: fir.copy %[[ADDR]] to %[[x]] no_overlap : !fir.ref<!fir.type<_QMtest_dinitTtseq{i:i32}>>, !fir.ptr<!fir.type<_QMtest_dinitTtseq{i:i32}>>
112112
113-
113+
114114 ! CHECK: %[[ycoor:.*]] = fir.coordinate_of %[[equiv]], %c0{{.*}} : (!fir.ref<!fir.array<4xi8>>, index) -> !fir.ref<i8>
115115 ! CHECK: %[[y:.*]] = fir.convert %[[ycoor]] : (!fir.ref<i8>) -> !fir.ptr<!fir.type<_QMtest_dinitTtseq{i:i32}>>
116116 ! CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QMtest_dinitTtseq.DerivedInit) : !fir.ref<!fir.type<_QMtest_dinitTtseq{i:i32}>>
@@ -129,14 +129,14 @@ subroutine noinit_local_alloc
129129 ! CHECK-NOT: fir.call @_FortranAInitialize
130130 type (t), allocatable :: x
131131 ! CHECK: return
132- end subroutine
132+ end subroutine
133133
134134 ! CHECK-LABEL: func @_QMtest_dinitPnoinit_local_pointer
135135 subroutine noinit_local_pointer
136136 ! CHECK-NOT: fir.call @_FortranAInitialize
137137 type (t), pointer :: x
138138 ! CHECK: return
139- end subroutine
139+ end subroutine
140140
141141 ! CHECK-LABEL: func @_QMtest_dinitPnoinit_normal_dummy
142142 subroutine noinit_normal_dummy (x )
@@ -150,7 +150,7 @@ subroutine noinit_intentinout_dummy(x)
150150 ! CHECK-NOT: fir.call @_FortranAInitialize
151151 type (t), intent (inout ) :: x
152152 ! CHECK: return
153- end subroutine
153+ end subroutine
154154
155155
156156 subroutine test_pointer_intentout (a , b )
0 commit comments