[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-reduction06.f90
blob58290c61cae860bb3658ec805798962f872f9fff
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 list item that appears in a REDUCTION clause should have a contiguous storage array section.
12 !$omp parallel do reduction(+:a(1:10:3))
13 do i = 1, 10
14 k = k + 1
15 end do
16 !$omp end parallel do
18 !ERROR: A list item that appears in a REDUCTION clause should have a contiguous storage array section.
19 !$omp parallel do reduction(+:b(1:10:3,1:8:1,1:5:1))
20 do i = 1, 10
21 k = k + 1
22 end do
23 !$omp end parallel do
25 !ERROR: A list item that appears in a REDUCTION clause should have a contiguous storage array section.
26 !$omp parallel do reduction(+:b(1:10:1,1:8:2,1:5:1))
27 do i = 1, 10
28 k = k + 1
29 end do
30 !$omp end parallel do
31 end program omp_reduction