53 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp -Werror -pedantic2! OpenMP Version 5.03! 2.19.4.4 firstprivate Clause4! 2.19.4.5 lastprivate Clause5! 2.19.6.1 copyin Clause6! 2.19.6.2 copyprivate Clause7! If the list item is a polymorphic variable with the allocatable attribute,8! the behavior is unspecified.9 10subroutine firstprivate()11 class(*), allocatable, save :: x12 13 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in FIRSTPRIVATE clause, the behavior is unspecified [-Wportability]14 !$omp parallel firstprivate(x)15 call sub()16 !$omp end parallel17 18end19 20subroutine lastprivate()21 class(*), allocatable, save :: x22 23 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in LASTPRIVATE clause, the behavior is unspecified [-Wportability]24 !$omp do lastprivate(x)25 do i = 1, 1026 call sub()27 enddo28 !$omp end do29 30end31 32subroutine copyin()33 class(*), allocatable, save :: x34 !$omp threadprivate(x)35 36 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in COPYIN clause, the behavior is unspecified [-Wportability]37 !$omp parallel copyin(x)38 call sub()39 !$omp end parallel40 41end42 43subroutine copyprivate()44 class(*), allocatable, save :: x45 !$omp threadprivate(x)46 47 !$omp single48 call sub()49 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in COPYPRIVATE clause, the behavior is unspecified [-Wportability]50 !$omp end single copyprivate(x)51 52end53