aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/parameter.f95
blob: cbe67dba7889ef8fe430c3ddb0621345b95cb3fd (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
! { dg-do compile } 

module test
contains
  subroutine oacc1
    implicit none
    integer :: i
    integer, parameter :: a = 1
    !$acc declare device_resident (a) ! { dg-error "is not a variable" }
    !$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) ! { dg-error "not a variable" }
    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