brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 2334a85 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.14.7 Declare Target Directive5 6module mod07  integer :: mi8 9contains10  subroutine subm()11    integer, save :: mmi12 13    !ERROR: The DECLARE TARGET directive and the common block or variable in it must appear in the same declaration section of a scoping unit14    !$omp declare target (mi)15    mi = 116  contains17    subroutine subsubm()18      !ERROR: The DECLARE TARGET directive and the common block or variable in it must appear in the same declaration section of a scoping unit19      !$omp declare target (mmi)20    end21  end22end23 24module mod125  integer :: mod_i26end27 28program main29  use mod130  integer, save :: i31  integer :: j32 33  !ERROR: The DECLARE TARGET directive and the common block or variable in it must appear in the same declaration section of a scoping unit34  !$omp declare target (mod_i)35 36contains37  subroutine sub()38    !ERROR: The DECLARE TARGET directive and the common block or variable in it must appear in the same declaration section of a scoping unit39    !ERROR: The DECLARE TARGET directive and the common block or variable in it must appear in the same declaration section of a scoping unit40    !$omp declare target (i, j)41    i = 142    j = 143  end44end45