[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_25.f90
blob39b7e23eb0f6009ed4a7def424f060136d9e6b0b
1 ! { dg-do run }
3 ! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
5 ! Contributed by <wangmianzhi1@linuxmail.org>
7 interface test
8 procedure testAlloc
9 procedure testPtr
10 end interface
12 integer, allocatable :: a1
13 integer, pointer :: a2
15 if (.not.test(a1)) call abort()
16 if (test(a2)) call abort()
18 contains
20 logical function testAlloc(obj)
21 integer, allocatable :: obj
22 testAlloc = .true.
23 end function
25 logical function testPtr(obj)
26 integer, pointer :: obj
27 testPtr = .false.
28 end function
30 end