Debian Codegraph @

flang/test/Lower/Intrinsics/sleep.f90

raw
1 ! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
2
3 subroutine test_sleep()
4 ! CHECK-LABEL: func.func @_QPtest_sleep() {
5
6 call sleep(1_2)
7 ! CHECK: %[[VAL_0:.*]] = arith.constant 1 : i16
8 ! CHECK: %[[VAL_1:.*]] = fir.convert %[[VAL_0]] : (i16) -> i64
9 ! CHECK: %[[VAL_2:.*]] = fir.call @_FortranASleep(%[[VAL_1]]) fastmath<contract> : (i64) -> none
10
11 call sleep(1_4)
12 ! CHECK: %[[VAL_3:.*]] = arith.constant 1 : i32
13 ! CHECK: %[[VAL_4:.*]] = fir.convert %[[VAL_3]] : (i32) -> i64
14 ! CHECK: %[[VAL_5:.*]] = fir.call @_FortranASleep(%[[VAL_4]]) fastmath<contract> : (i64) -> none
15
16 call sleep(1_8)
17 ! CHECK: %[[VAL_6:.*]] = arith.constant 1 : i64
18 ! CHECK: %[[VAL_7:.*]] = fir.convert %[[VAL_6]] : (i64) -> i64
19 ! CHECK: %[[VAL_8:.*]] = fir.call @_FortranASleep(%[[VAL_7]]) fastmath<contract> : (i64) -> none
20
21 call sleep(1_16)
22 ! CHECK: %[[VAL_9:.*]] = arith.constant 1 : i128
23 ! CHECK: %[[VAL_10:.*]] = fir.convert %[[VAL_9]] : (i128) -> i64
24 ! CHECK: %[[VAL_11:.*]] = fir.call @_FortranASleep(%[[VAL_10]]) fastmath<contract> : (i64) -> none
25 end
26 ! CHECK: return
27 ! CHECK: }