aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/parameter.f95
blob: 454924aed3d1f091bc8f098a86c595f58d2eedec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
! { dg-do compile } 

module test
contains
  subroutine oacc1
    implicit none
    integer :: i
    integer, parameter :: a = 1
    !$acc declare device_resident (a) ! { dg-error "PARAMETER" }
    !$acc data copy (a) ! { dg-error "not a variable" }
    !$acc end data
    !$acc data deviceptr (a) ! { dg-error "not a variable" }
    !$acc end data
    !$acc parallel private (a) ! { dg-error "not a variable" }
    !$acc end parallel
    !$acc host_data use_device (a) ! { dg-error "not a variable" }
    !$acc end host_data
    !$acc parallel loop reduction(+:a) ! { dg-error "not a variable" }
    do i = 1,5
    enddo
    !$acc end parallel loop
    !$acc parallel loop
    do i = 1,5
      !$acc cache (a) ! TODO: This must fail, as in openacc-1_0-branch
    enddo
    !$acc end parallel loop
    !$acc update device (a) ! { dg-error "not a variable" }
    !$acc update host (a) ! { dg-error "not a variable" }
    !$acc update self (a) ! { dg-error "not a variable" }
  end subroutine oacc1
end module test
! { dg-prune-output "ACC cache unimplemented" }