This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/23373] Functions returning pointers with pointer argument
- From: "rsandifo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2005 16:58:26 -0000
- Subject: [Bug fortran/23373] Functions returning pointers with pointer argument
- References: <20050813091629.23373.tkoenig@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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