1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp -Werror
3 ! 2.19.4.4 firstprivate Clause
4 ! 2.19.4.5 lastprivate Clause
5 ! 2.19.6.1 copyin Clause
6 ! 2.19.6.2 copyprivate Clause
7 ! If the list item is a polymorphic variable with the allocatable attribute,
8 ! the behavior is unspecified.
10 subroutine firstprivate()
11 class(*), allocatable
, save :: x
13 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in FIRSTPRIVATE clause, the behavior is unspecified
14 !$omp parallel firstprivate(x)
20 subroutine lastprivate()
21 class(*), allocatable
, save :: x
23 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in LASTPRIVATE clause, the behavior is unspecified
24 !$omp do lastprivate(x)
33 class(*), allocatable
, save :: x
34 !$omp threadprivate(x)
36 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in COPYIN clause, the behavior is unspecified
37 !$omp parallel copyin(x)
43 subroutine copyprivate()
44 class(*), allocatable
, save :: x
45 !$omp threadprivate(x)
47 !PORTABILITY: If a polymorphic variable with allocatable attribute 'x' is in COPYPRIVATE clause, the behavior is unspecified
48 !$omp single copyprivate(x)