This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47844] Array stride ignored for pointer-valued function results
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 1 Mar 2011 13:20:47 +0000
- Subject: [Bug fortran/47844] Array stride ignored for pointer-valued function results
- Auto-submitted: auto-generated
- References: <bug-47844-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47844
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|I/O: data transfer |Array stride ignored for
|statement: Array stride |pointer-valued function
|ignored for pointer-valued |results
|function results |
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-03-01 13:20:28 UTC ---
Does not only affect I/O but also assignment; cf. example below.
integer, target :: tgt(5) = [1,2,3,4,5]
integer :: var(3)
var = f(tgt) ! should assign 1 3 5
print *, ptr ! but prints 1 2 3
contains
function f(x)
integer, target :: x(:)
integer, pointer :: f(:)
f => x(::2)
end function f
end