| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2003" } |
| 3 |
! |
| 4 |
! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE |
| 5 |
! |
| 6 |
! Contributed by <[email protected]> |
| 7 |
|
| 8 |
module a |
| 9 |
|
| 10 |
interface test |
| 11 |
procedure testAlloc |
| 12 |
procedure testPtr |
| 13 |
end interface |
| 14 |
|
| 15 |
contains |
| 16 |
|
| 17 |
logical function testAlloc(obj) ! { dg-error "Ambiguous interfaces" } |
| 18 |
integer, allocatable :: obj |
| 19 |
testAlloc = .true. |
| 20 |
end function |
| 21 |
|
| 22 |
logical function testPtr(obj) ! { dg-error "Ambiguous interfaces" } |
| 23 |
integer, pointer :: obj |
| 24 |
testPtr = .false. |
| 25 |
end function |
| 26 |
|
| 27 |
end |