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

--- Comment #1 from martin <mscfd at gmx dot net> ---
Here is a smaller reproducer. The component "integer :: i" in type t is
necessary to reproduce the bug.

module mod

implicit none
private

public qv

type, public :: s
   real, dimension(1:3) :: vec
end type s

type, public :: t
   integer :: i
   type(s) :: v
end type t


contains


subroutine qv(x)
   class(s), dimension(:), intent(in) :: x
   integer :: i
   write(*,'(a,*(3f12.3," |"))') 'x = ', (x(i)%vec, i=1,ubound(x,1))
end subroutine qv

end module mod



program noncontiguous

use mod
implicit none

integer :: k
type(t), dimension(1:2) :: a

do k = 1,2
   a(k)%i = k
   a(k)%v%vec = [real(k)+1.0, real(k)+2.0, real(k)+3.0]
end do

call qv(a%v)

end program noncontiguous

Reply via email to