2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / crayptr1.f90
blobd246e8f04cf0bb3f0d27361f9e47423b2e15e06b
1 ! { dg-do compile }
2 ! { dg-options "-fopenmp -fcray-pointer" }
4 integer :: a, b, c, d, i
5 pointer (ip1, a)
6 pointer (ip2, b)
7 pointer (ip3, c)
8 pointer (ip4, d)
10 !$omp parallel shared (a) ! { dg-error "Cray pointee 'a' in SHARED clause" }
11 !$omp end parallel
13 !$omp parallel private (b) ! { dg-error "Cray pointee 'b' in PRIVATE clause" }
14 !$omp end parallel
16 !$omp parallel firstprivate (c) ! { dg-error "Cray pointee 'c' in FIRSTPRIVATE clause" }
17 !$omp end parallel
19 !$omp parallel do lastprivate (d) ! { dg-error "Cray pointee 'd' in LASTPRIVATE clause" }
20 do i = 1, 10
21 if (i .eq. 10) d = 1
22 end do
23 !$omp end parallel do
25 !$omp parallel reduction (+: a) ! { dg-error "Cray pointee 'a' in REDUCTION clause" }
26 !$omp end parallel
28 ip1 = loc (i)
29 !$omp parallel shared (ip1)
30 a = 2
31 !$omp end parallel
33 !$omp parallel private (ip2, i)
34 ip2 = loc (i)
35 b = 1
36 !$omp end parallel
38 ip3 = loc (i)
39 !$omp parallel firstprivate (ip3)
40 !$omp end parallel
42 !$omp parallel do lastprivate (ip4)
43 do i = 1, 10
44 if (i .eq. 10) ip4 = loc (i)
45 end do
46 !$omp end parallel do
48 !$omp parallel reduction (+: ip1) ! { dg-error "Cray pointer 'ip1' in REDUCTION clause" }
49 !$omp end parallel
51 end