view gcc/testsuite/gfortran.dg/pdt_20.f03 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
!
! Tests the fix for PR82622.
!
! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>
!
program p
   type t(a)
      integer, len :: a
   end type
   type t2(b)
      integer, len :: b
      type(t(1)) :: r(b)
   end type
   type(t2(:)), allocatable :: x
   allocate (t2(3) :: x)            ! Used to segfault in trans-array.c.
   if (x%b .ne. 3) STOP 1
   if (x%b .ne. size (x%r, 1)) STOP 2
   if (any (x%r%a .ne. 1)) STOP 3
end