This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/26791] New: Array reference out of bounds runtime error should print more information
- From: "jjcogliati-r1 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Mar 2006 23:31:11 -0000
- Subject: [Bug fortran/26791] New: Array reference out of bounds runtime error should print more information
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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