2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / realloc_on_assign_27.f08
blob9a786299565aea7484fbcdd2e878d8c378399cba
1 ! { dg-do run }
3   type :: t
4     integer :: i
5   end type
7   type, extends(t) :: r
8     real :: r
9   end type
11   class(t), allocatable :: x
12   type(r) :: y = r (3, 42)
14   x = y
15   if (x%i /= 3) call abort()
16   select type(x)
17     class is (r)
18       if (x%r /= 42.0) call abort()
19     class default
20       call abort()
21   end select
22 end