[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-reduction08.f90
blobe46585a068b74480cc34cfbfe5a7bec9435d2e22
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.6 Reduction Clause Positive cases
5 !DEF: /omp_reduction MainProgram
6 program omp_reduction
7 !DEF: /omp_reduction/i ObjectEntity INTEGER(4)
8 integer i
9 !DEF: /omp_reduction/k ObjectEntity INTEGER(4)
10 integer :: k = 10
11 !DEF: /omp_reduction/m ObjectEntity INTEGER(4)
12 integer :: m = 12
13 !$omp parallel do reduction(max:k)
14 !DEF: /omp_reduction/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
15 do i=1,10
16 !DEF: /omp_reduction/Block1/k (OmpReduction) HostAssoc INTEGER(4)
17 !DEF: /omp_reduction/max ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
18 !REF: /omp_reduction/m
19 k = max(k, m)
20 end do
21 !$omp end parallel do
23 !$omp parallel do reduction(min:k)
24 !DEF: /omp_reduction/Block2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
25 do i=1,10
26 !DEF: /omp_reduction/Block2/k (OmpReduction) HostAssoc INTEGER(4)
27 !DEF: /omp_reduction/min ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
28 !REF: /omp_reduction/m
29 k = min(k, m)
30 end do
31 !$omp end parallel do
33 !$omp parallel do reduction(iand:k)
34 !DEF: /omp_reduction/Block3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
35 do i=1,10
36 !DEF: /omp_reduction/Block3/k (OmpReduction) HostAssoc INTEGER(4)
37 !DEF: /omp_reduction/iand ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
38 !REF: /omp_reduction/m
39 k = iand(k, m)
40 end do
41 !$omp end parallel do
43 !$omp parallel do reduction(ior:k)
44 !DEF: /omp_reduction/Block4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
45 do i=1,10
46 !DEF: /omp_reduction/Block4/k (OmpReduction) HostAssoc INTEGER(4)
47 !DEF: /omp_reduction/ior ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
48 !REF: /omp_reduction/m
49 k = ior(k, m)
50 end do
51 !$omp end parallel do
53 !$omp parallel do reduction(ieor:k)
54 !DEF: /omp_reduction/Block5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
55 do i=1,10
56 !DEF: /omp_reduction/Block5/k (OmpReduction) HostAssoc INTEGER(4)
57 !DEF: /omp_reduction/ieor ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
58 !REF: /omp_reduction/m
59 k = ieor(k,m)
60 end do
61 !$omp end parallel do
63 end program omp_reduction