Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/realloc_on_assign_18.f90 @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
line wrap: on
line source
! { dg-do compile } ! { dg-options "-fdump-tree-original" } ! ! Ensure that for zero-sized array, nonzero memory is allocated ! type t end type t type(t), allocatable :: x, y(:) x = t() y = [ t :: ] if (.not. allocated (x)) call abort () if (.not. allocated (y)) call abort () end ! { dg-final { scan-tree-dump "x = \\(struct t .\\) __builtin_malloc \\(1\\);" "original" } } ! { dg-final { scan-tree-dump "y.data = \\(void . restrict\\) __builtin_malloc \\(1\\);" "original" } }