gcc/testsuite/gfortran.dg/proc_ptr_40.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR 56261: [OOP] seg fault call procedure pointer on polymorphic array |
| 4 | ! |
| 5 | ! Contributed by Andrew Benson <[email protected]> |
| 6 | |
| 7 | implicit none |
| 8 | type :: nc |
| 9 | end type |
| 10 | external :: qq |
| 11 | procedure( ), pointer :: f1 |
| 12 | procedure(ff), pointer :: f2 |
| 13 | |
| 14 | f1 => ff ! { dg-error "Explicit interface required" } |
| 15 | f2 => qq ! { dg-error "Explicit interface required" } |
| 16 | |
| 17 | contains |
| 18 | |
| 19 | subroutine ff (self) |
| 20 | class(nc) :: self |
| 21 | end subroutine |
| 22 | |
| 23 | end |