Debian Codegraph @

flang/test/Semantics/OpenACC/acc-resolve04.f90

raw
1 ! RUN: %flang_fc1 -fopenacc %s
2
3 ! Check common block resolution.
4 ! Check that symbol are correctly resolved in device, host and self clause.
5
6 subroutine sub(a)
7 implicit none
8 real :: a(10)
9 real :: b(10), c(10), d
10 common/foo/ b, d, c
11 integer :: i, n
12
13 !$acc declare present(/foo/)
14 !$acc parallel loop gang vector
15 do i = 1, n
16 b(i) = a(i) + c(i) * d
17 end do
18 end subroutine
19
20 program test_resolve04
21 real :: a(10), b(10)
22 common /foo/ b, c
23
24 !$acc data create(/foo/)
25 !$acc update device(/foo/)
26 !$acc update host(/foo/)
27 !$acc update self(/foo/)
28 !$acc end data
29
30 !$acc data copy(/foo/)
31 !$acc end data
32
33 end
34