[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Lower / OpenACC / acc-routine04.f90
blobf60337616390131e1b10a30cebac07faa603c04d
1 ! This test checks correct lowering when OpenACC routine directive is placed
2 ! before implicit none.
4 ! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s
6 module dummy_mod
7 contains
9 subroutine sub1(i)
10 !$acc routine seq
11 integer :: i
12 end subroutine
13 end module
15 program test_acc_routine
16 use dummy_mod
18 !$acc routine(sub2) seq
20 implicit none
22 integer :: i
24 contains
25 subroutine sub2()
26 end subroutine
28 end program
30 ! CHECK: acc.routine @acc_routine_1 func(@_QFPsub2) seq
31 ! CHECK: acc.routine @acc_routine_0 func(@_QMdummy_modPsub1) seq
32 ! CHECK: func.func @_QMdummy_modPsub1(%arg0: !fir.ref<i32> {fir.bindc_name = "i"}) attributes {acc.routine_info = #acc.routine_info<[@acc_routine_0]>}
33 ! CHECK: func.func @_QQmain() attributes {fir.bindc_name = "test_acc_routine"}
34 ! CHECK: func.func private @_QFPsub2() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_1]>, fir.host_symbol = @_QQmain, llvm.linkage = #llvm.linkage<internal>}