brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · c2cf9ba Raw
54 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags4! OpenMP Version 5.15! Check OpenMP construct validity for the following directives:6! 2.21.2 Threadprivate Directive7 8module thread_private019  use omp_lib10  type my_type(kind_param, len_param)11    integer, KIND :: kind_param12    integer, LEN :: len_param13    integer :: t_i14    integer :: t_arr(10)15  end type my_type16 17  type(my_type(2, 4)) :: my_var18  integer :: arr(10)19  integer(kind=4) :: x20  character(len=32) :: w21  integer, dimension(:), allocatable :: y22 23  !$omp threadprivate(my_var)24 25  !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the THREADPRIVATE directive26  !$omp threadprivate(my_var%t_i)27 28  !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the THREADPRIVATE directive29  !$omp threadprivate(my_var%t_arr)30 31  !ERROR: A type parameter inquiry cannot appear on the THREADPRIVATE directive32  !$omp threadprivate(my_var%kind_param)33 34  !ERROR: A type parameter inquiry cannot appear on the THREADPRIVATE directive35  !$omp threadprivate(my_var%len_param)36 37  !$omp threadprivate(arr)38 39  !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the THREADPRIVATE directive40  !$omp threadprivate(arr(1))41 42  !ERROR: A variable that is part of another variable (as an array or structure element) cannot appear on the THREADPRIVATE directive43  !$omp threadprivate(arr(1:2))44 45  !ERROR: A type parameter inquiry cannot appear on the THREADPRIVATE directive46  !$omp threadprivate(x%KIND)47 48  !ERROR: A type parameter inquiry cannot appear on the THREADPRIVATE directive49  !$omp threadprivate(w%LEN)50 51  !ERROR: A type parameter inquiry cannot appear on the THREADPRIVATE directive52  !$omp threadprivate(y%KIND)53end54