mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-27 02:09:54 +00:00
e28e1b4b6d
This patch adds various lowering test for calls. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D122306 Co-authored-by: Jean Perier <jperier@nvidia.com> Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Co-authored-by: Mats Petersson <mats.petersson@arm.com>
21 lines
668 B
Fortran
21 lines
668 B
Fortran
! Test for PassBy::Value
|
|
! RUN: bbc -emit-fir %s -o - | FileCheck %s
|
|
program call_by_value
|
|
interface
|
|
subroutine omp_set_nested(enable) bind(c)
|
|
logical, value :: enable
|
|
end subroutine omp_set_nested
|
|
end interface
|
|
|
|
logical do_nested
|
|
do_nested = .FALSE.
|
|
call omp_set_nested(do_nested)
|
|
end program call_by_value
|
|
!CHECK-LABEL: func @_QQmain()
|
|
!CHECK: %[[LOGICAL:.*]] = fir.alloca !fir.logical<4>
|
|
!CHECK: %false = arith.constant false
|
|
!CHECK: %[[VALUE:.*]] = fir.convert %false : (i1) -> !fir.logical<4>
|
|
!CHECK: fir.store %[[VALUE]] to %[[LOGICAL]]
|
|
!CHECK: %[[LOAD:.*]] = fir.load %[[LOGICAL]]
|
|
!CHECK: fir.call @omp_set_nested(%[[LOAD]]) : {{.*}}
|