https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91512

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This should be exposed by

module y
contains
  subroutine bar(a,n)
    real, dimension(n), intent(inout) :: a
    a = a + 1.0
  end subroutine bar
end module y

module x
  use y
contains
  subroutine foo(a)
    real, dimension(:), intent(inout) :: a
    call bar (a,size(a))
  end subroutine foo
end module x

The subroutine foo takes a descriptor, and it needs to repack
the data for passing it as a reference to bar.  The reason is
that somebody may call foo with a non-uniform stride, as in

program main
  use x
  real, dimension(10) :: a
  call random_number(a)
  call foo(a(1:10:2))
  print *,a
end program main

Reply via email to