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/47844] Array stride ignored for pointer-valued function results


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


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