brintos

brintos / llvm-project-archived public Read only

0
0
Text · 980 B · 3fc3077 Raw
36 lines · plain
1! This test checks lowering of OpenACC routine directive in interfaces.2 3! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s4 5 6subroutine sub1(a)7  !$acc routine worker bind(sub2)8  real :: a(:)9end subroutine10 11subroutine sub2(a)12  !$acc routine worker nohost13  real :: a(:)14end subroutine15 16subroutine test17 18interface19  subroutine sub1(a)20    !$acc routine worker bind(sub2)21    real :: a(:)22  end subroutine23 24  subroutine sub2(a)25    !$acc routine worker nohost26    real :: a(:)27  end subroutine28end interface29 30end subroutine31 32! CHECK: acc.routine @acc_routine_1 func(@_QPsub2) worker nohost33! CHECK: acc.routine @acc_routine_0 func(@_QPsub1) bind(@_QPsub2) worker34! 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