public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/53379] [4.7/4.8 Regression] No backtrace generated for array bounds violation
Date: Thu, 31 May 2012 19:46:00 -0000	[thread overview]
Message-ID: <bug-53379-4-owfRtcOWyK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53379-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Harald Anlauf <anlauf at gmx dot de> 2012-05-31 19:41:03 UTC ---
(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. Or in other words, "error
> termination", as specified in the Fortran standard, should not lead to a
> backtrace. See also the comment in runtime/error.c that talks about this.

The patch in comment #1 changes only runtime_error_at, which appears to
be generated by the front-end only.

BTW: The program

program test
  open(unit=10, file="/no/such/file", action='read')
end program test

gives with 4.7 and the patch in comment #1:

At line 2 of file test.f90 (unit = 10, file = '')
Fortran runtime error: File '/no/such/file' does not exist

while 4.6.2 with -fbacktrace produces:
At line 2 of file test.f90 (unit = 10, file = '')
Fortran runtime error: File '/no/such/file' does not exist

Backtrace for this error:
  + function test (0x80485F9)
    at line 3 of file test.f90
  + /lib/libc.so.6(__libc_start_main+0xf3) [0xb73be003]

The latter error is generated by a call to runtime_error_at in
the compiled program, while the former error in open must be
generated somewhere in st_open and descendants.

Not relevant here, but note the missing file name in the first
line of the error message.


  parent reply	other threads:[~2012-05-31 19:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 17:17 [Bug fortran/53379] New: [4.7 " anlauf at gmx dot de
2012-05-16 20:30 ` [Bug fortran/53379] " anlauf at gmx dot de
2012-05-18  7:36 ` [Bug fortran/53379] [4.7/4.8 " jb at gcc dot gnu.org
2012-05-18  7:43 ` burnus at gcc dot gnu.org
2012-05-18 14:46 ` jb at gcc dot gnu.org
2012-05-18 15:04 ` anlauf at gmx dot de
2012-05-29 14:40 ` rguenth at gcc dot gnu.org
2012-05-31 19:41 ` anlauf at gmx dot de
2012-05-31 19:46 ` anlauf at gmx dot de [this message]
2012-05-31 19:47 ` anlauf at gmx dot de
2012-06-14  8:49 ` rguenth at gcc dot gnu.org
2012-09-20 10:27 ` jakub at gcc dot gnu.org
2013-02-20 21:21 ` jb at gcc dot gnu.org
2013-04-11  8:00 ` [Bug fortran/53379] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2013-12-29 11:55 ` dominiq at lps dot ens.fr
2014-06-12 13:45 ` [Bug fortran/53379] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-02 11:59 ` [Bug fortran/53379] [4.8/4.9/5 " Joost.VandeVondele at mat dot ethz.ch
2014-12-04 21:05 ` anlauf at gmx dot de
2014-12-05  8:46 ` Joost.VandeVondele at mat dot ethz.ch
2014-12-19 13:28 ` jakub at gcc dot gnu.org
2015-06-23  8:22 ` [Bug fortran/53379] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:58 ` [Bug fortran/53379] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:29 ` jakub at gcc dot gnu.org
2015-08-31 16:55 ` Joost.VandeVondele at mat dot ethz.ch
2015-08-31 21:12 ` fxcoudert at gcc dot gnu.org
2015-09-04 22:04 ` jb at gcc dot gnu.org
2015-09-04 22:17 ` jb at gcc dot gnu.org
2015-09-04 22:20 ` jb at gcc dot gnu.org
2015-09-05  6:55 ` Joost.VandeVondele at mat dot ethz.ch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53379-4-owfRtcOWyK@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).