2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / pr40878-1.f90
blob86202ab5d0e78c807631648f0b37cb5f24481086
1 ! PR fortran/40878
2 ! { dg-do compile }
3 ! { dg-options "-fopenmp" }
5 subroutine test1
6 integer :: j, k
7 integer :: m = 2
8 !$omp parallel do collapse(m) schedule (static,1) ! { dg-error "Constant expression required" }
9 do k = 1, 2
10 do j = 1, 6
11 enddo
12 enddo
13 !$omp end parallel do
14 end
15 subroutine test2
16 integer :: j, k
17 integer :: m
18 m = 2
19 !$omp parallel do collapse(m) schedule (static,1) ! { dg-error "Constant expression required" }
20 do k = 1, 2
21 do j = 1, 6
22 enddo
23 enddo
24 !$omp end parallel do
25 end
26 subroutine test3
27 integer :: j, k
28 integer, parameter :: m = 0
29 !$omp parallel do collapse(m) schedule (static,1) ! { dg-error "not constant positive integer" }
30 do k = 1, 2
31 do j = 1, 6
32 enddo
33 enddo
34 !$omp end parallel do
35 end
36 subroutine test4
37 integer :: j, k
38 integer, parameter :: m = -2
39 !$omp parallel do collapse(m) schedule (static,1) ! { dg-error "not constant positive integer" }
40 do k = 1, 2
41 do j = 1, 6
42 enddo
43 enddo
44 !$omp end parallel do
45 end
46 subroutine test5
47 integer :: j, k
48 !$omp parallel do collapse(0) schedule (static,1) ! { dg-error "not constant positive integer" }
49 do k = 1, 2
50 do j = 1, 6
51 enddo
52 enddo
53 !$omp end parallel do
54 end
55 subroutine test6
56 integer :: j, k
57 !$omp parallel do collapse(-1) schedule (static,1) ! { dg-error "not constant positive integer" }
58 do k = 1, 2
59 do j = 1, 6
60 enddo
61 enddo
62 !$omp end parallel do
63 end