aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-4.f90
blob: 66cf0a3925ea99459229afca8aabf5b2c5145d02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do compile }
implicit none
integer ::x,z
x = 42
print '(*(z16:" "))', loc(x)
!$omp target map(x, z)
block
  integer :: y
  x = 123
  y = 99
  !$omp target device(ancestor:1) map(always,tofrom:x) map(y) ! { dg-error "'ancestor' device modifier not preceded by 'requires' directive with 'reverse_offload' clause" }
    print '(*(z16:" "))', loc(x), loc(y)
    print * ,x, y
    x = -x
    y = -y
  !$omp end target ! { dg-error "Unexpected ..OMP END TARGET statement" }
  z = y
end block
    print * ,x !, z
end