1! { dg-do run } 2! 3! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE 4! 5! Contributed by <wangmianzhi1@linuxmail.org> 6 7 interface test 8 procedure testAlloc 9 procedure testPtr 10 end interface 11 12 integer, allocatable :: a1 13 integer, pointer :: a2 14 15 if (.not.test(a1)) call abort() 16 if (test(a2)) call abort() 17 18contains 19 20 logical function testAlloc(obj) 21 integer, allocatable :: obj 22 testAlloc = .true. 23 end function 24 25 logical function testPtr(obj) 26 integer, pointer :: obj 27 testPtr = .false. 28 end function 29 30end 31