* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / realloc_on_assign_18.f90
blob7dcd22e11b0982df3081156432bd312bb80c30ea
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! Ensure that for zero-sized array, nonzero memory is allocated
6 type t
7 end type t
9 type(t), allocatable :: x, y(:)
11 x = t()
12 y = [ t :: ]
14 if (.not. allocated (x)) call abort ()
15 if (.not. allocated (y)) call abort ()
16 end
18 ! { dg-final { scan-tree-dump "x = \\(struct t .\\) __builtin_malloc \\(1\\);" "original" } }
19 ! { dg-final { scan-tree-dump "y.data = \\(void . restrict\\) __builtin_malloc \\(1\\);" "original" } }