This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53379] [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 20:30:13 +0000
- Subject: [Bug fortran/53379] [4.7 Regression] No backtrace generated for array bounds violation
- Auto-submitted: auto-generated
- References: <bug-53379-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53379
--- Comment #1 from Harald Anlauf <anlauf at gmx dot de> 2012-05-16 20:30:13 UTC ---
Solution: the function gfortran_runtime_error_at() should
call the abort. One might adjust this dependent on options.backtrace
if the core dump is not desired.
Patch: (should be applicable to 4.7 and 4.8 trunk)
Index: libgfortran/runtime/error.c
===================================================================
--- libgfortran/runtime/error.c (revision 184777)
+++ libgfortran/runtime/error.c (working copy)
@@ -333,7 +333,7 @@
st_vprintf (message, ap);
va_end (ap);
estr_write ("\n");
- exit (2);
+ sys_abort();
}
iexport(runtime_error_at);