brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · d43fb55 Raw
35 lines · plain
1! RUN: flang -fc1 -emit-hlfir %s -o - | FileCheck %s2 3module m34  type x15     integer::ix16  end type x17  type,extends(x1)::x28  end type x29  type,extends(x2)::x310  end type x311  class(x1),pointer,dimension(:)::cy112contains13  subroutine dummy()14  entry      chk(c1)15   class(x1),dimension(3)::c116 end subroutine dummy17end module m318! CHECK-LABEL: func.func @_QMm3Pchk(19! CHECK-SAME:    %[[ARG0:.*]]: !fir.class<!fir.array<3x!fir.type<_QMm3Tx1{ix1:i32}>>> {fir.bindc_name = "c1"}) {20! CHECK:         %[[DUMMY_SCOPE:.*]] = fir.dummy_scope : !fir.dscope21! CHECK:         %[[DECLARE:.*]]:2 = hlfir.declare %[[ARG0]] dummy_scope %[[DUMMY_SCOPE]] {{.*}} {uniq_name = "_QMm3FdummyEc1"} : (!fir.class<!fir.array<3x!fir.type<_QMm3Tx1{ix1:i32}>>>, !fir.dscope) -> (!fir.class<!fir.array<3x!fir.type<_QMm3Tx1{ix1:i32}>>>, !fir.class<!fir.array<3x!fir.type<_QMm3Tx1{ix1:i32}>>>)22 23subroutine s124  use m325  type(x1),target::ty1(3)26  ty1%ix1=[1,2,3]27  cy1=>ty128  call chk(cy1)29end subroutine s130 31program main32  call s133  print *,'pass'34end program main35