diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/allocate_error_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/allocate_error_1.f90 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/allocate_error_1.f90 b/gcc/testsuite/gfortran.dg/allocate_error_1.f90 new file mode 100644 index 000000000..42a12159e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/allocate_error_1.f90 @@ -0,0 +1,14 @@ +! { 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 |