gcc/testsuite/gfortran.dg/generic_33.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE |
| 4 | ! |
| 5 | ! Contributed by Janus Weil <[email protected]> |
| 6 | |
| 7 | type :: t |
| 8 | end type |
| 9 | |
| 10 | interface test |
| 11 | procedure testAlloc |
| 12 | procedure testPtr |
| 13 | end interface |
| 14 | |
| 15 | contains |
| 16 | |
| 17 | logical function testAlloc(obj) |
| 18 | class(t), allocatable :: obj |
| 19 | testAlloc = .true. |
| 20 | end function |
| 21 | |
| 22 | logical function testPtr(obj) |
| 23 | class(t), pointer :: obj |
| 24 | testPtr = .false. |
| 25 | end function |
| 26 | |
| 27 | end |