[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Lower / HLFIR / intrinsic-subroutines.f90
blob775c1509620d20c0e4b1422a8cddcd174f16f772
1 ! Test lowering of intrinsic subroutines to HLFIR what matters here
2 ! is not to test each subroutine, but to check how their
3 ! lowering interfaces with the rest of lowering.
4 ! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck %s
6 subroutine test_subroutine(x)
7 real :: x
8 call cpu_time(x)
9 end subroutine
10 ! CHECK-LABEL: func.func @_QPtest_subroutine(
11 ! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %{{.*}}
12 ! CHECK: %[[VAL_2:.*]] = fir.call @_FortranACpuTime() fastmath<contract> : () -> f64
13 ! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_2]] : (f64) -> f32
14 ! CHECK: fir.store %[[VAL_3]] to %[[VAL_1]]#1 : !fir.ref<f32>