I think my example is a syntactically correct instance of procedure
pointer initialization but both gfortran and an old version of ifort
error out on it:
module funcs
implicit none
interface
subroutine a() bind(C,name='a1')
implicit none
end subroutine a
subroutine b() bind(C,name='a2')
implicit none
end subroutine b
end interface
end module funcs
program start
use funcs
implicit none
type has_fun
procedure(a), pointer, nopass :: fun
end type has_fun
type(has_fun) :: lots(2) = [has_fun(a),has_fun(b)]
procedure(a), pointer :: stuff => b
end program start
subroutine c() bind(C,name='a1')
implicit none
end subroutine c
subroutine d() bind(C,name='a2')
implicit none
end subroutine d
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 159 |
Nodes: | 16 (0 / 16) |
Uptime: | 99:13:45 |
Calls: | 3,209 |
Files: | 10,563 |
Messages: | 3,009,783 |