56 lines · plain
1! RUN: bbc -emit-hlfir -fcuda -gpu=managed %s -o - | FileCheck %s2 3module matching4 interface host_and_device5 module procedure sub_host6 module procedure sub_device7 end interface8 9 interface all10 module procedure sub_host11 module procedure sub_device12 module procedure sub_managed13 module procedure sub_unified14 end interface15 16 interface all_without_managed17 module procedure sub_host18 module procedure sub_device19 module procedure sub_unified20 end interface21 22contains23 subroutine sub_host(a)24 integer :: a(:)25 end26 27 subroutine sub_device(a)28 integer, device :: a(:)29 end30 31 subroutine sub_managed(a)32 integer, managed :: a(:)33 end34 35 subroutine sub_unified(a)36 integer, unified :: a(:)37 end38end module39 40program m41 use matching42 43 integer, allocatable :: actual_host(:)44 45 allocate(actual_host(10))46 47 call host_and_device(actual_host) ! Should resolve to sub_device48 call all(actual_host) ! Should resolved to unified49 call all_without_managed(actual_host) ! Should resolved to managed50end51 52! CHECK: fir.call @_QMmatchingPsub_device53! CHECK: fir.call @_QMmatchingPsub_managed54! CHECK: fir.call @_QMmatchingPsub_unified55 56