2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_array_17.f90
blobe5961e110355fcd178ed45b1cd957f4b0012b81f
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/57456
6 module m
7 implicit none
8 type t
9 integer :: i
10 end type t
11 type, extends(t) :: t2
12 integer :: j
13 end type t2
14 end module m
16 program test
17 use m
18 implicit none
19 integer :: i
20 class(t), save, allocatable :: y(:)
22 allocate (t2 :: y(5))
23 select type(y)
24 type is (t2)
25 do i = 1, 5
26 y(i)%i = i
27 y(i)%j = i*10
28 end do
29 end select
30 deallocate(y)
31 end
33 ! { dg-final { scan-tree-dump-times "__builtin_malloc \\(40\\);" 1 "original" } }
34 ! { dg-final { cleanup-tree-dump "original" } }