Take the program: program bad_array integer,dimension(8) :: array array(9) = 123 end program bad_array
Compile with: gfortran -g -fbounds-check -o bad_array bad_array.f90 Run: ./bad_array Fortran runtime error: Array reference out of bounds I would expect that this sould print the program location that caused the array out of bounds error like: Fortran runtime error: Array reference out of bounds at bad_array.f90:3 A workaround is to run in gdb and break on _gfortrani_runtime_error and then look at the stack trace. -- Summary: Array reference out of bounds runtime error should print more information Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jjcogliati-r1 at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26791