[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / omp-simd-aligned.f90
blobf4424aa5c46e92f6db634fb464e45c77ae352b19
1 ! RUN: %S/test_errors.sh %s %t %flang -fopenmp
2 ! REQUIRES: shell
4 ! OpenMP Version 4.5
5 ! 2.8.1 simd Construct
6 ! Semantic error for correct test case
8 program omp_simd
9 integer i, j, k
10 integer, allocatable :: a(:), b(:)
12 allocate(a(10))
13 allocate(b(10))
15 !ERROR: List item 'a' present at multiple ALIGNED clauses
16 !$omp simd aligned(a, a)
17 do i = 1, 10
18 a(i) = i
19 end do
20 !$omp end simd
22 !ERROR: List item 'a' present at multiple ALIGNED clauses
23 !ERROR: List item 'b' present at multiple ALIGNED clauses
24 !$omp simd aligned(a,a) aligned(b) aligned(b)
25 do i = 1, 10
26 a(i) = i
27 b(i) = i
28 end do
29 !$omp end simd
31 !ERROR: List item 'a' present at multiple ALIGNED clauses
32 !$omp simd aligned(a) aligned(a)
33 do i = 1, 10
34 a(i) = i
35 end do
36 !$omp end simd
38 !$omp simd aligned(a) aligned(b)
39 do i = 1, 10
40 a(i) = i
41 b(i) = i
42 end do
43 !$omp end simd
45 !ERROR: List item 'a' present at multiple ALIGNED clauses
46 !$omp simd aligned(a) private(a) aligned(a)
47 do i = 1, 10
48 a(i) = i
49 b(i) = i
50 end do
51 !$omp end simd
53 print *, a
55 end program omp_simd