PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / realloc_on_assign_27.f08
blobe408389a741d0631d4a878410aee14615dbe9ba9
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) STOP 1
16   select type(x)
17     class is (r)
18       if (x%r /= 42.0) STOP 2
19     class default
20       STOP 3
21   end select
22 end