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

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Fri May 18 15:04:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53379

--- Comment #5 from Harald Anlauf <anlauf at gmx dot de> 2012-05-18 15:02:07 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > FWIW, if it is decided to change this, one could also consider changing
> > runtime_error() and internal_error() in the same way, though one would need to
> > audit the usage in libgfortran so that we don't generate a backtrace for a
> > "file not found" or similar "benign" error.
> 
> I agree that, at least by default, "file not found" shouldn't print a backtrace
> - though one could still think of it with some aggressive backtrace
> flag/environment variable.

One option is too add a runtime_fatal() that gets called by those checks
that are considered non-recoverable and deserve a backtrace if backtrace
is requested.  Examples are array-bounds violations, invalid pointers,
etc.  However, this requires an audit of the frontend.



More information about the Gcc-bugs mailing list