| ! RUN: %python %S/test_errors.py %s %flang -fopenmp |
| ! Variables that appear in expressions for statement function definitions |
| ! may not appear in private, firstprivate or lastprivate clauses. |
| subroutine stmt_function(temp) |
| real :: c, f, s, v, t(10) |
| c(temp) = p * (temp - q) / r |
| f(temp) = q + (temp * r/p) |
| v(temp) = c(temp) + f(temp)/2 - s |
| !ERROR: Variable 'p' in STATEMENT FUNCTION expression cannot be in a PRIVATE clause |
| !$omp parallel private(p) |
| !ERROR: Variable 's' in STATEMENT FUNCTION expression cannot be in a FIRSTPRIVATE clause |
| !$omp parallel firstprivate(s) |
| !ERROR: Variable 's' in STATEMENT FUNCTION expression cannot be in a LASTPRIVATE clause |
| !$omp parallel do lastprivate(s, t) |
| end subroutine stmt_function |