view gcc/testsuite/gfortran.dg/allocate_error_1.f90 @ 127:4c56639505ff

fix function.c and add CbC-example Makefile
author mir3636
date Wed, 11 Apr 2018 18:46:58 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do run }
! { dg-shouldfail "runtime error" }
! { dg-output "At line 13.*Attempting to allocate .* 'arr'" }

! PR fortran/37507
! Check that locus is printed for ALLOCATE errors.

PROGRAM main
  IMPLICIT NONE
  INTEGER, ALLOCATABLE :: arr(:)

  ALLOCATE (arr(5))
  ALLOCATE (arr(6))
END PROGRAM main