brintos

brintos / llvm-project-archived public Read only

0
0
Text · 990 B · cfae406 Raw
37 lines · plain
1! This test checks the lowering of OpenMP Indirect Clause when used with the Declare Target directive2 3! RUN: not %flang -fopenmp -fopenmp-version=50 %s 2>&1 | FileCheck %s --check-prefix="CHECK-50"4! RUN: not %flang -fopenmp -fopenmp-version=52 %s 2>&1 | FileCheck %s --check-prefix="CHECK-52"5 6module functions7  implicit none8 9  interface10    function func() result(i)11      character(1) :: i12    end function13  end interface14 15contains16  function func1() result(i)17    !CHECK-50: INDIRECT clause is not allowed on directive DECLARE TARGET in OpenMP v5.0, try -fopenmp-version=5118    !CHECK-52: not yet implemented: Unhandled clause INDIRECT in DECLARE TARGET construct19    !$omp declare target enter(func1) indirect(.true.)20    character(1) :: i21    i = 'a'22    return23  end function24end module25 26program main27  use functions28  implicit none29  procedure (func), pointer :: ptr1=>func130  character(1) :: val131 32  !$omp target map(from: val1)33  val1 = ptr1()34  !$omp end target35 36end program37