1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! Variables that appear in expressions for statement function definitions
4 ! may not appear in private, firstprivate or lastprivate clauses.
6 subroutine stmt_function(temp
)
9 real :: c
, f
, s
, v
, t(10)
10 real, intent(in
) :: temp
12 c(temp
) = p
* (temp
- q
) / r
13 f(temp
) = q
+ (temp
* r
/p
)
14 v(temp
) = c(temp
) + f(temp
)/2 - s
20 !ERROR: Variable 'p' in statement function expression cannot be in a PRIVATE clause
21 !$omp parallel private(p)
25 !ERROR: Variable 's' in statement function expression cannot be in a FIRSTPRIVATE clause
26 !$omp parallel firstprivate(s)
30 !ERROR: Variable 's' in statement function expression cannot be in a LASTPRIVATE clause
31 !$omp parallel do lastprivate(s, t)
33 t(i
) = v(temp
) + i
- s
39 end subroutine stmt_function