brintos

brintos / llvm-project-archived public Read only

0
0
Text · 679 B · eb2597c Raw
21 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp2! OpenMP Version 5.2, Sections 3.2.1 & 5.33subroutine omp_firstprivate(init)4  integer :: init5  integer :: a(10)6  type my_type7    integer :: val8  end type my_type9  type(my_type) :: my_var10 11  !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a FIRSTPRIVATE clause12  !$omp parallel firstprivate(a(2))13    a(2) = init14  !$omp end parallel15 16  !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear in a FIRSTPRIVATE clause17  !$omp parallel firstprivate(my_var%val)18    my_var%val = init19  !$omp end parallel20end subroutine21