brintos

brintos / llvm-project-archived public Read only

0
0
Text · 737 B · b6363c2 Raw
20 lines · plain
1! Test lowering of derived type temporary creation and init2! RUN: bbc -emit-hlfir %s -o - | FileCheck %s3 4program derived_temp_init5  type t16    integer, allocatable :: i7  end type8  type t29    type(t1) :: c10  end type11  type(t1) :: x12  type(t2) :: y13  y = t2(x)14end15 16! CHECK: %[[ALLOC:.*]] =  fir.alloca !fir.type<_QFTt1{i:!fir.box<!fir.heap<i32>>}> {bindc_name = "x", uniq_name = "_QFEx"}17! CHECK: %[[x:.*]]:2 = hlfir.declare %[[ALLOC]] {{.*}}18! CHECK: %[[ADDR:.*]] = fir.address_of(@_QQ_QFTt1.DerivedInit) : !fir.ref<!fir.type<_QFTt1{i:!fir.box<!fir.heap<i32>>}>>19! CHECK: fir.copy %[[ADDR]] to %[[x]]#0 no_overlap : !fir.ref<!fir.type<_QFTt1{i:!fir.box<!fir.heap<i32>>}>>, !fir.ref<!fir.type<_QFTt1{i:!fir.box<!fir.heap<i32>>}>>20