mirror of
https://github.com/autc04/Retro68.git
synced 2024-09-28 18:56:06 +00:00
23 lines
446 B
Fortran
23 lines
446 B
Fortran
! { dg-do run }
|
|
!
|
|
! Test the fix for PR49636 in which the 'span' of 'ty1' was not used
|
|
! in the descriptor of 'i'.
|
|
!
|
|
! Contributed by Fred Krogh <fkrogh#gcc@mathalacarte.com>
|
|
!
|
|
program test
|
|
type ty1
|
|
integer :: k
|
|
integer :: i
|
|
end type ty1
|
|
type ty2
|
|
type(ty1) :: j(3)
|
|
end type ty2
|
|
|
|
type(ty2) t2
|
|
t2%j(1:3)%i = [ 1, 3, 5 ]
|
|
associate (i=>t2%j%i)
|
|
if (any (t2%j(1:3)%i .ne. i(1:3))) stop 1
|
|
end associate
|
|
end program test
|