This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53379] [4.7/4.8 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: Fri, 18 May 2012 15:02:07 +0000
- Subject: [Bug fortran/53379] [4.7/4.8 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 #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.