[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git] / flang / test / Semantics / OpenMP / resolve05.f90
blobc4cebb48ac5c2b7d47d7ed3c20d0f898ac437d19
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! 2.15.3 Data-Sharing Attribute Clauses
4 ! 2.15.3.1 default Clause
6 subroutine default_none()
7 integer a(3)
8 integer, parameter :: D=10
9 A = 1
10 B = 2
11 !$omp parallel default(none) private(c)
12 !ERROR: The DEFAULT(NONE) clause requires that 'a' must be listed in a data-sharing attribute clause
13 A(1:2) = 3
14 !ERROR: The DEFAULT(NONE) clause requires that 'b' must be listed in a data-sharing attribute clause
15 B = 4
16 C = 5 + D
17 !$omp end parallel
18 end subroutine default_none
20 ! Test that indices of sequential loops are privatised and hence do not error
21 ! for DEFAULT(NONE)
22 subroutine default_none_seq_loop
23 integer :: i
25 !$omp parallel do default(none)
26 do i = 1, 10
27 do j = 1, 20
28 enddo
29 enddo
30 end subroutine
32 program mm
33 call default_none()
34 call default_none_seq_loop()
35 !TODO: private, firstprivate, shared
36 end