Files
clang-p2996/flang/test/Semantics/OpenMP/threadprivate06.f90
Kiran Chandramohan 9f0e59f3c1 [Flang][OpenMP] Re-enable tests on windows 2/n (#93013)
Re-enables the single, symbol and threadprivate tests
2024-05-22 18:02:41 +01:00

31 lines
570 B
Fortran

! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.21.2 Threadprivate Directive
program main
call sub1()
print *, 'pass'
end program main
subroutine sub1()
common /c/ a
!$omp threadprivate(/c/)
integer :: a
a = 100
call sub2()
if (a .ne. 101) print *, 'err'
contains
subroutine sub2()
common /c/ a
!$omp threadprivate(/c/)
integer :: a
!$omp parallel copyin(/c/)
a = a + 1
!$omp end parallel
end subroutine
end subroutine