This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/51082] [F03] Wrong result for a pointer to a proc-pointer component


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]