This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53379] New: [4.7 Regression] No backtrace generated for array bounds violation
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 May 2012 17:15:24 +0000
- Subject: [Bug fortran/53379] New: [4.7 Regression] No backtrace generated for array bounds violation
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53379
Bug #: 53379
Summary: [4.7 Regression] No backtrace generated for array
bounds violation
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: anlauf@gmx.de
With gfortran 4.6.2 I got a useful traceback for the program given below:
% gfortran -g -fbacktrace -fcheck=all gfcbug119.f90
% ./a.out
At line 8 of file gfcbug119.f90
Fortran runtime error: Index '-1' of dimension 1 of array 'k' below lower bound
of 1
Backtrace for this error:
+ function foo (0x80486F4)
at line 8 of file gfcbug119.f90
+ function gfcbug119 (0x80487D0)
at line 4 of file gfcbug119.f90
+ /lib/libc.so.6(__libc_start_main+0xf3) [0xb73b7003]
Version 4.7 only produces:
At line 8 of file gfcbug119.f90
Fortran runtime error: Index '-1' of dimension 1 of array 'k' below lower bound
of 1
So, unfortunately no backtrace anymore. :-(
I'll try to figure out what's going wrong.
program gfcbug119
implicit none
integer :: k(10)
call foo (k,-1)
contains
subroutine foo (k,i)
integer, intent(in) :: k(:), i
print *, k(i)
end subroutine foo
end program gfcbug119