summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/deallocate_error_1.f90
blob: 98ffdb3b91ad156606687593ec7cb3d6def3f180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do run }
! { dg-shouldfail "runtime error" }
! { dg-output "At line 14.*Attempt to DEALLOCATE unallocated 'arr'" }

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

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

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