Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / nontemporal.f90
blob6d24849575ee9324076994857d94a9d3b2b7848e
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! REQUIRES: shell
3 ! Check OpenMP clause validity for NONTEMPORAL clause
5 program omp_simd
6 integer i
7 integer, allocatable :: a(:)
9 allocate(a(10))
11 !$omp simd nontemporal(a)
12 do i = 1, 10
13 a(i) = i
14 end do
15 !$omp end simd
17 !$omp parallel do simd nontemporal(a)
18 do i = 1, 10
19 a(i) = i
20 end do
21 !$omp end parallel do simd
23 !$omp parallel do simd nontemporal(a)
24 do i = 1, 10
25 a(i) = i
26 end do
27 !$omp end parallel do simd
29 !ERROR: NONTEMPORAL clause is not allowed on the DO SIMD directive
30 !$omp do simd nontemporal(a)
31 do i = 1, 10
32 a(i) = i
33 end do
34 !$omp end do simd
36 !$omp taskloop simd nontemporal(a)
37 do i = 1, 10
38 a(i) = i
39 end do
40 !$omp end taskloop simd
42 !$omp teams
43 !$omp distribute parallel do simd nontemporal(a)
44 do i = 1, 10
45 a(i) = i
46 end do
47 !$omp end distribute parallel do simd
48 !$omp end teams
50 !$omp teams
51 !$omp distribute simd nontemporal(a)
52 do i = 1, 10
53 a(i) = i
54 end do
55 !$omp end distribute simd
56 !$omp end teams
58 !$omp target parallel do simd nontemporal(a)
59 do i = 1, 10
60 a(i) = i
61 end do
62 !$omp end target parallel do simd
64 !$omp target simd nontemporal(a)
65 do i = 1, 10
66 a(i) = i
67 end do
68 !$omp end target simd
70 !$omp teams distribute simd nontemporal(a)
71 do i = 1, 10
72 a(i) = i
73 end do
74 !$omp end teams distribute simd
76 !$omp teams distribute parallel do simd nontemporal(a)
77 do i = 1, 10
78 a(i) = i
79 end do
80 !$omp end teams distribute parallel do simd
82 !$omp target teams distribute parallel do simd nontemporal(a)
83 do i = 1, 10
84 a(i) = i
85 end do
86 !$omp end target teams distribute parallel do simd
88 !$omp target teams distribute simd nontemporal(a)
89 do i = 1, 10
90 a(i) = i
91 end do
92 !$omp end target teams distribute simd
95 end program omp_simd