This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/53379] [4.7 Regression] No backtrace generated for array bounds violation


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]