[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / reduction02.f90
blob4fd9fbe2d8a53d192bb03be0844d78c50207c99d
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.6 Reduction Clause
4 program omp_reduction
6 integer :: i
7 integer :: k = 10
8 integer :: j = 10
10 !ERROR: 'k' appears in more than one data-sharing clause on the same OpenMP directive
11 !$omp parallel do reduction(+:k), reduction(*:k)
12 do i = 1, 10
13 k = k + 1
14 k = k * 3
15 end do
16 !$omp end parallel do
18 !ERROR: 'k' appears in more than one data-sharing clause on the same OpenMP directive
19 !$omp parallel do reduction(+:k), reduction(*:j), reduction(+:k)
20 do i = 1, 10
21 k = k + 1
22 j = j * 3
23 end do
24 !$omp end parallel do
26 !ERROR: 'k' appears in more than one data-sharing clause on the same OpenMP directive
27 !$omp parallel do reduction(+:j), reduction(*:k), reduction(+:k)
28 do i = 1, 10
29 j = j + 1
30 k = k + 1
31 k = k * 3
32 end do
33 !$omp end parallel do
35 !ERROR: 'k' appears in more than one data-sharing clause on the same OpenMP directive
36 !$omp parallel do reduction(+:j), reduction(*:k), private(k)
37 do i = 1, 10
38 j = j + 1
39 k = k + 1
40 k = k * 3
41 end do
42 !$omp end parallel do
43 end program omp_reduction