1! This test checks lowering of OpenACC routine directive in interfaces. 2 3! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s 4 5 6subroutine sub1(a) 7 !$acc routine worker bind(sub2) 8 real :: a(:) 9end subroutine 10 11subroutine sub2(a) 12 !$acc routine worker nohost 13 real :: a(:) 14end subroutine 15 16subroutine test 17 18interface 19 subroutine sub1(a) 20 !$acc routine worker bind(sub2) 21 real :: a(:) 22 end subroutine 23 24 subroutine sub2(a) 25 !$acc routine worker nohost 26 real :: a(:) 27 end subroutine 28end interface 29 30end subroutine 31 32! CHECK: acc.routine @acc_routine_1 func(@_QPsub2) worker nohost 33! CHECK: acc.routine @acc_routine_0 func(@_QPsub1) bind("_QPsub2") worker 34! CHECK: func.func @_QPsub1(%arg0: !fir.box<!fir.array<?xf32>> {fir.bindc_name = "a"}) attributes {acc.routine_info = #acc.routine_info<[@acc_routine_0]>} 35! CHECK: func.func @_QPsub2(%arg0: !fir.box<!fir.array<?xf32>> {fir.bindc_name = "a"}) attributes {acc.routine_info = #acc.routine_info<[@acc_routine_1]>} 36