brintos

brintos / llvm-project-archived public Read only

0
0
Text · 766 B · 1438d79 Raw
42 lines · plain
1! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols %s | FileCheck %s2 3subroutine bar(i, a)4    !$omp declare target5    real :: a6    integer :: i7    a = a - i8end subroutine9 10function baz(a)11    !$omp declare target12    real, intent(in) :: a13    baz = a14end function baz15 16program main17real a18!CHECK: bar (Subroutine, OmpDeclareTarget): HostAssoc19!CHECK: baz (Function, OmpDeclareTarget): HostAssoc20!$omp declare target(bar)21!$omp declare target(baz)22 23a = baz(a)24call bar(2,a)25call foo(a)26return27end28 29subroutine foo(a)30real a31integer i32!CHECK: bar (Subroutine, OmpDeclareTarget): HostAssoc33!CHECK: baz (Function, OmpDeclareTarget): HostAssoc34!$omp declare target(bar)35!$omp declare target(baz)36!$omp target37    a = baz(a)38    call bar(i,a)39!$omp end target40return41end42