[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git] / flang / test / Semantics / OpenMP / reduction05.f90
blobaa115ed7454ba2ffef7245cb3620de44a468f838
1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.15.3.6 Reduction Clause
5 program omp_reduction
7 integer :: i
8 integer :: k = 10
9 integer :: a(10),b(10,10,10)
11 !ERROR: 'a' in REDUCTION clause is a zero size array section
12 !$omp parallel do reduction(+:a(1:0:2))
13 do i = 1, 10
14 k = k + 1
15 end do
16 !$omp end parallel do
18 !ERROR: 'a' in REDUCTION clause is a zero size array section
19 !$omp parallel do reduction(+:a(1:0))
20 do i = 1, 10
21 k = k + 1
22 end do
23 !$omp end parallel do
25 !ERROR: 'b' in REDUCTION clause is a zero size array section
26 !$omp parallel do reduction(+:b(1:6,5,1:0))
27 do i = 1, 10
28 k = k + 1
29 end do
30 !$omp end parallel do
32 !ERROR: 'b' in REDUCTION clause is a zero size array section
33 !$omp parallel do reduction(+:b(1:6,1:0:5,1:10))
34 do i = 1, 10
35 k = k + 1
36 end do
37 !$omp end parallel do
38 end program omp_reduction