27 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror -pedantic2! Confirm a portability warning on use of a procedure binding apart from a call3module m4 type t5 contains6 procedure :: sub7 end type8 contains9 subroutine sub(x)10 class(t), intent(in) :: x11 end subroutine12end module13 14program test15 use m16 procedure(sub), pointer :: p17 type(t) x18 !PORTABILITY: Procedure binding 'sub' used as target of a pointer assignment [-Wbinding-as-procedure]19 p => x%sub20 !PORTABILITY: Procedure binding 'sub' passed as an actual argument [-Wbinding-as-procedure]21 call sub2(x%sub)22 contains23 subroutine sub2(s)24 procedure(sub) s25 end subroutine26end27