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/23373] Functions returning pointers with pointer argument


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-09-07 16:58 -------
Hmm.  I supposed I'd better check.  Is the following code
also valid:

program main
  implicit none
  real, dimension (:), pointer :: x
  x => null()
  x => test ()
contains
  function test
    real, dimension (:), pointer :: test
    if (associated (x)) call abort
    allocate (test (10))
    if (associated (x)) call abort
  end function test
end program main

I've not read anything in the standard that forbids it, but I'd
appreciate it if more seasoned folks could comment.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23373


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