Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/allocate_with_source_19.f08 @ 128:fe568345ddd5
fix CbC-example
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 19:32:28 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do compile } ! { dg-options -std=f2008 } ! Contributed by mrestelli@gmail.com ! Check that instead of an ICE the error message is emitted. module m implicit none contains subroutine s() real, allocatable :: x(:) real :: y y = 5.0 ! x either needs an array spec, or y needs to be an array. allocate( x , source=y ) ! { dg-error "Array specification or array-valued SOURCE= expression required in ALLOCATE statement" } end subroutine s end module m