[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / bindings03.f90
blob84227348e20340fa978994c8f4f2858b06da8b28
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
2 ! Confirm a portability warning on use of a procedure binding apart from a call
3 module m
4 type t
5 contains
6 procedure :: sub
7 end type
8 contains
9 subroutine sub(x)
10 class(t), intent(in) :: x
11 end subroutine
12 end module
14 program test
15 use m
16 procedure(sub), pointer :: p
17 type(t) x
18 !PORTABILITY: Procedure binding 'sub' used as target of a pointer assignment
19 p => x%sub
20 !PORTABILITY: Procedure binding 'sub' passed as an actual argument
21 call sub2(x%sub)
22 contains
23 subroutine sub2(s)
24 procedure(sub) s
25 end subroutine
26 end