This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51082] [F03] Wrong result for a pointer to a proc-pointer component
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Nov 2011 20:04:55 +0000
- Subject: [Bug fortran/51082] [F03] Wrong result for a pointer to a proc-pointer component
- Auto-submitted: auto-generated
- References: <bug-51082-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51082
--- Comment #1 from janus at gcc dot gnu.org 2011-11-10 20:04:55 UTC ---
Note: The following variant works.
program ala
implicit none
type process_list
procedure(ala1), pointer, nopass :: process
end type
type(process_list), target :: p_list
type(process_list), pointer :: p
real :: r
p_list%process => ala1
p => p_list
r = p%process(1.0)
write(*,*) r
contains
real function ala1(x)
real, intent(in) :: x
ala1 = x
end function ala1
end program ala