brintos

brintos / llvm-project-archived public Read only

0
0
Text · 982 B · a81e319 Raw
47 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp2! OpenMP Version 4.53! 2.15.3.3 private Clause4! Variables that appear in namelist statements may not appear in a private clause.5 6module test7  integer :: a, b, c8  namelist /nlist1/ a, b9end module10 11program omp_private12  use test13 14  integer :: p(10) ,q(10)15  namelist /nlist2/ c, d16 17  a = 518  b = 1019  c = 10020 21  !ERROR: Variable 'a' in NAMELIST cannot be in a PRIVATE clause22  !ERROR: Variable 'c' in NAMELIST cannot be in a PRIVATE clause23  !$omp parallel private(a, c)24  d = a + b25  !$omp end parallel26 27  call sb()28 29  contains30    subroutine sb()31      namelist /nlist3/ p, q32 33      !ERROR: Variable 'p' in NAMELIST cannot be in a PRIVATE clause34      !ERROR: Variable 'd' in NAMELIST cannot be in a PRIVATE clause35      !$omp parallel private(p, d)36      p = c * b37      q = p * d38      !$omp end parallel39 40      write(*, nlist1)41      write(*, nlist2)42      write(*, nlist3)43 44    end subroutine45 46end program omp_private47