modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pdt_20.f03
blobb712ed59dbb07b2089e9bda75fd9a174fdf41d36
1 ! { dg-do run }
3 ! Tests the fix for PR82622.
5 ! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>
7 program p
8    type t(a)
9       integer, len :: a
10    end type
11    type t2(b)
12       integer, len :: b
13       type(t(1)) :: r(b)
14    end type
15    type(t2(:)), allocatable :: x
16    allocate (t2(3) :: x)            ! Used to segfault in trans-array.c.
17    if (x%b .ne. 3) STOP 1
18    if (x%b .ne. size (x%r, 1)) STOP 2
19    if (any (x%r%a .ne. 1)) STOP 3
20 end