4 ! If a PASS(arg) is invalid, a call to this routine later would ICE in
5 ! resolving. Check that this also works for GENERIC, in addition to the
8 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
15 integer, allocatable :: iv1(:), iv2(:)
19 procedure, pass(a) :: makenull ! { dg-error "has no argument 'a'" }
20 generic :: null2 => makenull
22 end type base_foo_type
26 subroutine makenull(m)
28 type(base_foo_type), intent(inout) :: m
33 end subroutine makenull
35 subroutine foo_free(a,info)
37 Type(base_foo_type), intent(inout) :: A
38 Integer, intent(out) :: info
43 if (allocated(a%iv1)) then
44 deallocate(a%iv1,stat=iret)
45 if (iret /= 0) info = max(info,2)
47 if (allocated(a%iv2)) then
48 deallocate(a%iv2,stat=iret)
49 if (iret /= 0) info = max(info,3)
53 call a%null2 () ! { dg-error "no matching specific binding" }
56 End Subroutine foo_free
60 ! { dg-final { cleanup-modules "foo_mod" } }