31 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %python %S/../test_errors.py %s %flang %openmp_flags -fopenmp-version=524! OpenMP Version 5.25! 14.1 Interop construct6! To check various semantic errors for inteorp construct.7 8SUBROUTINE test_interop_01()9 USE omp_lib10 INTEGER(OMP_INTEROP_KIND) :: obj11 !ERROR: Each interop-var may be specified for at most one action-clause of each INTEROP construct.12 !$OMP INTEROP INIT(TARGETSYNC,TARGET: obj) USE(obj)13 PRINT *, 'pass'14END SUBROUTINE test_interop_0115 16SUBROUTINE test_interop_02()17 USE omp_lib18 INTEGER(OMP_INTEROP_KIND) :: obj19 !ERROR: Each interop-type may be specified at most once.20 !$OMP INTEROP INIT(TARGETSYNC,TARGET,TARGETSYNC: obj)21 PRINT *, 'pass'22END SUBROUTINE test_interop_0223 24SUBROUTINE test_interop_03()25 USE omp_lib26 INTEGER(OMP_INTEROP_KIND) :: obj27 !ERROR: A DEPEND clause can only appear on the directive if the interop-type includes TARGETSYNC28 !$OMP INTEROP INIT(TARGET: obj) DEPEND(INOUT: obj)29 PRINT *, 'pass'30END SUBROUTINE test_interop_0331