| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fcheck=pointer" } |
| 3 |
! |
| 4 |
! PR fortran/102900 |
| 5 |
|
| 6 |
module cs |
| 7 |
implicit none |
| 8 |
interface |
| 9 |
function classStar_map_ifc() result(y) |
| 10 |
import |
| 11 |
class(*), pointer :: y |
| 12 |
end function classStar_map_ifc |
| 13 |
end interface |
| 14 |
|
| 15 |
contains |
| 16 |
|
| 17 |
function selector() |
| 18 |
procedure(classStar_map_ifc), pointer :: selector |
| 19 |
selector => NULL() |
| 20 |
end function selector |
| 21 |
|
| 22 |
function selector_result() result(f) |
| 23 |
procedure(classStar_map_ifc), pointer :: f |
| 24 |
f => NULL() |
| 25 |
end function selector_result |
| 26 |
|
| 27 |
function fun(x) result(y) |
| 28 |
class(*), pointer :: y |
| 29 |
class(*), target, intent(in) :: x |
| 30 |
select type (x) |
| 31 |
class default |
| 32 |
y => null() |
| 33 |
end select |
| 34 |
end function fun |
| 35 |
|
| 36 |
end module cs |