Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / simd-aligned.f90
blob9b42118e2e1e41dd1d4cf9a37cec0c8061c1d3b7
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! OpenMP Version 4.5
4 ! 2.8.1 simd Construct
5 ! Semantic error for correct test case
7 program omp_simd
8 integer i, j, k
9 integer, allocatable :: a(:), b(:)
11 allocate(a(10))
12 allocate(b(10))
14 !ERROR: List item 'a' present at multiple ALIGNED clauses
15 !$omp simd aligned(a, a)
16 do i = 1, 10
17 a(i) = i
18 end do
19 !$omp end simd
21 !ERROR: List item 'a' present at multiple ALIGNED clauses
22 !ERROR: List item 'b' present at multiple ALIGNED clauses
23 !$omp simd aligned(a,a) aligned(b) aligned(b)
24 do i = 1, 10
25 a(i) = i
26 b(i) = i
27 end do
28 !$omp end simd
30 !ERROR: List item 'a' present at multiple ALIGNED clauses
31 !$omp simd aligned(a) aligned(a)
32 do i = 1, 10
33 a(i) = i
34 end do
35 !$omp end simd
37 !$omp simd aligned(a) aligned(b)
38 do i = 1, 10
39 a(i) = i
40 b(i) = i
41 end do
42 !$omp end simd
44 !ERROR: List item 'a' present at multiple ALIGNED clauses
45 !$omp simd aligned(a) private(a) aligned(a)
46 do i = 1, 10
47 a(i) = i
48 b(i) = i
49 end do
50 !$omp end simd
52 print *, a
54 end program omp_simd