| 1 |
! This test checks lowering of OpenACC routine directive. |
| 2 |
|
| 3 |
! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s |
| 4 |
|
| 5 |
subroutine sub1(a, n) |
| 6 |
integer :: n |
| 7 |
real :: a(n) |
| 8 |
end subroutine sub1 |
| 9 |
|
| 10 |
!$acc routine(sub1) |
| 11 |
|
| 12 |
program test |
| 13 |
integer, parameter :: N = 10 |
| 14 |
real :: a(N) |
| 15 |
call sub1(a, N) |
| 16 |
end program |
| 17 |
|
| 18 |
! CHECK-LABEL: acc.routine @acc_routine_0 func(@_QPsub1) |
| 19 |
|
| 20 |
! CHECK: func.func @_QPsub1(%ar{{.*}}: !fir.ref<!fir.array<?xf32>> {fir.bindc_name = "a"}, %arg1: !fir.ref<i32> {fir.bindc_name = "n"}) attributes {acc.routine_info = #acc.routine_info<[@acc_routine_0]>} |