brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · cdbf370 Raw
45 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2! OpenMP Version 5.13! Check OpenMP construct validity for the following directives:4! 2.21.2 Threadprivate Directive5 6module mod07  integer :: mi8 9contains10  subroutine subm()11    integer, save :: mmi12 13    !ERROR: The THREADPRIVATE directive and the common block or variable in it must appear in the same declaration section of a scoping unit14    !$omp threadprivate(mi)15    mi = 116  contains17    subroutine subsubm()18      !ERROR: The THREADPRIVATE directive and the common block or variable in it must appear in the same declaration section of a scoping unit19      !$omp threadprivate(mmi)20    end21  end22end23 24module mod125  integer :: mod_i26end27 28program main29  use mod130  integer, save :: i31  integer :: j32 33  !ERROR: The THREADPRIVATE directive and the common block or variable in it must appear in the same declaration section of a scoping unit34  !$omp threadprivate(mod_i)35 36contains37  subroutine sub()38    !ERROR: The THREADPRIVATE directive and the common block or variable in it must appear in the same declaration section of a scoping unit39    !ERROR: The THREADPRIVATE directive and the common block or variable in it must appear in the same declaration section of a scoping unit40    !$omp threadprivate(i, j)41    i = 142    j = 143  end44end45