xref: /llvm-project/flang/test/Lower/Intrinsics/floor.f90 (revision f5759add702eb0b1243198d7f49b7a010b977f5d)
1! RUN: bbc -emit-fir %s -o - | FileCheck %s
2
3! CHECK-LABEL: floor_test1
4subroutine floor_test1(i, a)
5    integer :: i
6    real :: a
7    i = floor(a)
8    ! CHECK: %[[f:.*]] = math.floor %{{.*}} : f32
9    ! CHECK: fir.convert %[[f]] : (f32) -> i32
10  end subroutine
11  ! CHECK-LABEL: floor_test2
12  subroutine floor_test2(i, a)
13    integer(8) :: i
14    real :: a
15    i = floor(a, 8)
16    ! CHECK: %[[f:.*]] = math.floor %{{.*}} : f32
17    ! CHECK: fir.convert %[[f]] : (f32) -> i64
18  end subroutine
19
20