brintos

brintos / llvm-project-archived public Read only

0
0
Text · 916 B · bf50cd1 Raw
33 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp2 3! The ASSOCIATE name preserves the association with the selector established4! in the associate statement. Therefore it is incorrect to change the5! data-sharing attribute of the name.6 7subroutine assoc_private(x)8  integer :: x9  associate(z => x)10  !ERROR: Variable 'z' in ASSOCIATE cannot be in a PRIVATE clause11  !$omp parallel private(z)12  !$omp end parallel13  end associate14end subroutine15 16subroutine assoc_firstprivate(x)17  integer :: x18  associate(z => x)19  !ERROR: Variable 'z' in ASSOCIATE cannot be in a FIRSTPRIVATE clause20  !$omp parallel firstprivate(z)21  !$omp end parallel22  end associate23end subroutine24 25subroutine assoc_lastprivate(x)26  integer :: x27  associate(z => x)28  !ERROR: Variable 'z' in ASSOCIATE cannot be in a LASTPRIVATE clause29  !$omp parallel sections lastprivate(z)30  !$omp end parallel sections31  end associate32end subroutine33