tree-optimization/113385 - wrong loop father with early exit vectorization
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / pr67500.f90
blob1cecdc485781ac2818961de308570c619063fab5
1 ! Fortran version of PR c/67500
2 ! { dg-do compile }
4 subroutine f1
5 !$omp declare simd simdlen(d) ! { dg-error "requires a scalar INTEGER expression" }
6 end subroutine
8 subroutine f2
9 !$omp declare simd simdlen(0.5) ! { dg-error "requires a scalar INTEGER expression" }
10 end
12 subroutine f3 (i)
13 !$omp declare simd simdlen(-2) ! { dg-warning "INTEGER expression of SIMDLEN clause at .1. must be positive" }
14 end subroutine
16 subroutine f4
17 !$omp declare simd simdlen(0) ! { dg-warning "INTEGER expression of SIMDLEN clause at .1. must be positive" }
18 end
20 subroutine foo(p, d, n)
21 integer, allocatable :: p(:)
22 real, value :: d
23 integer, value :: n
24 integer :: i
26 !$omp simd safelen(d) ! { dg-error "requires a scalar INTEGER expression" }
27 do i = 1, 16
28 end do
30 !$omp simd safelen(0.5) ! { dg-error "requires a scalar INTEGER expression" }
31 do i = 1, 16
32 end do
34 !$omp simd safelen(-2) ! { dg-warning "INTEGER expression of SAFELEN clause at .1. must be positive" }
35 do i = 1, 16
36 end do
38 !$omp simd safelen(0) ! { dg-warning "INTEGER expression of SAFELEN clause at .1. must be positive" }
39 do i = 1, 16
40 end do
42 !$omp simd aligned(p:n) ! { dg-error "requires a scalar positive constant integer alignment expression" }
43 do i = 1, 16
44 end do
46 !$omp simd aligned(p:0.5) ! { dg-error "requires a scalar positive constant integer alignment expression" }
47 do i = 1, 16
48 end do
50 !$omp simd aligned(p:-2) ! { dg-error "requires a scalar positive constant integer alignment expression" }
51 do i = 1, 16
52 end do
54 !$omp simd aligned(p:0) ! { dg-error "requires a scalar positive constant integer alignment expression" }
55 do i = 1, 16
56 end do
57 end