File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ ! RUN: flang -fc1 -emit-hlfir %s -o - | FileCheck %s
2+
3+ program main
4+ logical :: a1
5+ data a1/ .true. /
6+ call sb(% val(a1))
7+ ! CHECK: %[[A1_ADDR:.*]] = fir.address_of(@_QFEa1) : !fir.ref<!fir.logical<4>>
8+ ! CHECK: %[[A1_DECL:.*]]:2 = hlfir.declare %[[A1_ADDR]] {uniq_name = "_QFEa1"} : (!fir.ref<!fir.logical<4>>) -> (!fir.ref<!fir.logical<4>>, !fir.ref<!fir.logical<4>>)
9+ ! CHECK: %[[A1_LOADED:.*]] = fir.load %[[A1_DECL]]#0 : !fir.ref<!fir.logical<4>>
10+ ! CHECK: fir.call @_QFPsb(%[[A1_LOADED]]) fastmath<contract> : (!fir.logical<4>) -> ()
11+ ! CHECK: func.func private @_QFPsb(%[[SB_ARG:.*]]: !fir.logical<4> {fir.bindc_name = "x1"})
12+ write (6 ,* ) " a1 = " , a1
13+ contains
14+ subroutine sb (x1 )
15+ logical , value :: x1
16+ end subroutine sb
17+ end program main
You can’t perform that action at this time.
0 commit comments