1 2module amod 3 implicit none 4 integer :: b(8) 5 6 !$acc declare copy (b) ! { dg-error "Invalid clause in module" } 7 !$acc declare copyout (b) ! { dg-error "Invalid clause in module" } 8 !$acc declare present (b) ! { dg-error "Invalid clause in module" } 9 !$acc declare present_or_copy (b) ! { dg-error "Invalid clause in module" } 10 !$acc declare present_or_copyin (b) ! { dg-error "present on multiple" } 11 !$acc declare present_or_copyout (b) ! { dg-error "Invalid clause in module" } 12 !$acc declare present_or_create (b) ! { dg-error "present on multiple" } 13 !$acc declare deviceptr (b) ! { dg-error "Invalid clause in module" } 14 !$acc declare create (b) copyin (b) ! { dg-error "present on multiple" } 15end module 16 17module amod2 18contains 19subroutine asubr (a, b, c, d, e, f, g, h, i, j, k) 20 implicit none 21 integer, dimension(8) :: a, b, c, d, e, f, g, h, i, j, k 22 23 !$acc declare copy (a) 24 !$acc declare copyout (b) 25 !$acc declare present (c) 26 !$acc declare present_or_copy (d) 27 !$acc declare present_or_copyin (e) 28 !$acc declare present_or_copyout (f) 29 !$acc declare present_or_create (g) 30 !$acc declare deviceptr (h) 31 !$acc declare create (j) copyin (k) 32end subroutine 33end module 34 35module bmod 36 37 implicit none 38 integer :: a, b, c, d, e, f, g, h, i 39 common /data1/ a, b, c 40 common /data2/ d, e, f 41 common /data3/ g, h, i 42 !$acc declare link (a) ! { dg-error "element of a COMMON" } 43 !$acc declare link (/data1/) 44 !$acc declare link (a, b, c) ! { dg-error "element of a COMMON" } 45 !$acc declare link (/foo/) ! { dg-error "not found" } 46 !$acc declare device_resident (/data2/) 47 !$acc declare device_resident (/data3/) ! { dg-error "present on multiple clauses" } 48 !$acc declare device_resident (g, h, i) 49 50end module 51 52subroutine bsubr (foo) 53 implicit none 54 55 integer, dimension (:) :: foo 56 57 !$acc declare copy (foo) ! { dg-error "Assumed-size dummy array" } 58 !$acc declare copy (foo(1:2)) ! { dg-error "Assumed-size dummy array" } 59 60end subroutine bsubr 61 62subroutine multiline 63 integer :: b(8) 64 65 !$acc declare copyin (b) ! { dg-error "present on multiple clauses" } 66 !$acc declare copyin (b) 67 68end subroutine multiline 69 70subroutine subarray 71 integer :: c(8) 72 73 !$acc declare copy (c(1:2)) ! { dg-error "Array sections: 'c' not allowed" } 74 75end subroutine subarray 76 77program test 78 integer :: a(8) 79 80 !$acc declare create (a) copyin (a) ! { dg-error "present on multiple clauses" } 81 82end program 83