2 ! { dg-additional-options "-fcheck=mem" }
3 ! { dg-shouldfail "Fortran runtime error: Assignment of scalar to unallocated array" }
5 ! This omission was encountered in the course of fixing PR54070. Whilst this is a
6 ! very specific case, others such as allocatable components have been tested.
8 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
10 function g(a
) result (res
)
12 real,allocatable
:: res(:)
13 res
= a
! Since 'res' is not allocated, a runtime error should occur.
17 function g(a
) result(res
)
19 real,allocatable
:: res(:)
28 real, allocatable
, dimension(:) :: r
35 character(:), allocatable
, dimension(:) :: c
37 type (barfoo
) :: foobarfoo