[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git] / flang / test / Semantics / OpenMP / depend01.f90
blob29468f4358855b76cbfb15253fca7e347d03230b
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.13.9 Depend Clause
4 ! List items used in depend clauses cannot be zero-length array sections.
6 program omp_depend
7 integer :: a(10) , b(10,10)
8 a = 10
9 b = 20
11 !$omp parallel
12 !$omp single
14 !ERROR: 'a' in DEPEND clause is a zero size array section
15 !ERROR: 'b' in DEPEND clause is a zero size array section
16 !$omp task shared(a,b) depend(out: a(2:1), b(3:1, 1:-1))
17 a(2:1) = b(2, 2)
18 !$omp end task
20 !ERROR: Stride should not be specified for array section in DEPEND clause
21 !$omp task shared(x) depend(in: a(5:10:1))
22 print *, a(5:10), b
23 !$omp end task
25 !$omp end single
26 !$omp end parallel
28 end program omp_depend