50 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp2 3module my_module4 interface foo5 subroutine foo_int(a)6 integer :: a7 end subroutine8 subroutine foo_real(a)9 real :: a10 end subroutine11 end interface12contains13 subroutine bar(N)14 integer :: N15 entry entry1(N)16 end subroutine17 subroutine foobar(N)18 integer::N19 !ERROR: The procedure 'entry1' in DECLARE TARGET construct cannot be an entry name.20 !$omp declare target(bar, entry1)21 call bar(N)22 end subroutine23end module24 25module other_mod26 abstract interface27 integer function foo(a)28 integer, intent(in) :: a29 end function30 end interface31 procedure(foo), pointer :: procptr32 !ERROR: The procedure 'procptr' in DECLARE TARGET construct cannot be a procedure pointer.33 !$omp declare target(procptr)34end module35 36subroutine baz(x)37 real, intent(inout) :: x38 real :: res 39 stmtfunc(x) = 4.0 * (x**3)40 !ERROR: The procedure 'stmtfunc' in DECLARE TARGET construct cannot be a statement function.41 !$omp declare target (stmtfunc)42 res = stmtfunc(x)43end subroutine44 45program main46 use my_module47 !ERROR: The procedure 'foo' in DECLARE TARGET construct cannot be a generic name.48 !$omp declare target(foo)49end50