Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / simd-nontemporal.f90
bloba488edd98cdc3f050fef1537cfa28f7da5575d9e
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 NONTEMPORAL clauses
15 !$omp simd nontemporal(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 NONTEMPORAL clauses
22 !ERROR: List item 'b' present at multiple NONTEMPORAL clauses
23 !$omp simd nontemporal(a,a) nontemporal(b) nontemporal(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 NONTEMPORAL clauses
31 !$omp simd nontemporal(a) nontemporal(a)
32 do i = 1, 10
33 a(i) = i
34 end do
35 !$omp end simd
37 !$omp simd nontemporal(a) nontemporal(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 NONTEMPORAL clauses
45 !$omp simd nontemporal(a) private(a) nontemporal(a)
46 do i = 1, 10
47 a(i) = i
48 b(i) = i
49 end do
50 !$omp end simd
52 !ERROR: List item 'a' present at multiple NONTEMPORAL clauses
53 !ERROR: List item 'b' present at multiple NONTEMPORAL clauses
54 !$omp simd nontemporal(a,a,b,b)
55 do i = 1, 10
56 a(i) = i
57 b(i) = i
58 end do
59 !$omp end simd
61 print *, a
63 end program omp_simd