public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31538] misleading bounds check error
Date: Fri, 16 Apr 2010 17:25:00 -0000	[thread overview]
Message-ID: <20100416172445.10519.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31538-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from burnus at gcc dot gnu dot org  2010-04-16 17:24 -------
(In reply to comment #7)
> Assuming 'i = -4' is missing in the programming

Well, almost any number would do, but "i = -4" is fine.

> why is the runtime bounds check not a sufficient error message?

Because:

  Fortran runtime error: Array bound mismatch for dimension 1 of array 'f'

is less helpful than our other gfortran out-of-bounds error messages; to be in
line with those, one should have:

  Fortran runtime error: Array bound mismatch for dimension 1 of array 'f'
(5/2)

or something like that which should also the two extends. Knowing the extends
it can make it sometimes much easier to find the cause of the wrong extend.

In the comment of comment 5 you see how other gfortran errors look like
"(%d/%d)" and how the NAG error message looks like for this case ("extent 5
instead of 2").


-- 


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


  parent reply	other threads:[~2010-04-16 17:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11 15:08 [Bug fortran/31538] New: result_in_spec_1.f90: Invalid write burnus at gcc dot gnu dot org
2007-04-11 19:26 ` [Bug fortran/31538] " burnus at gcc dot gnu dot org
2007-04-11 20:05 ` paulthomas2 at wanadoo dot fr
2007-04-11 21:48 ` pault at gcc dot gnu dot org
2007-04-11 21:53 ` [Bug fortran/31538] misleading bounds check error pault at gcc dot gnu dot org
2007-08-10  9:43 ` burnus at gcc dot gnu dot org
2010-04-16 16:05 ` kargl at gcc dot gnu dot org
2010-04-16 16:14 ` kargl at gcc dot gnu dot org
2010-04-16 17:25 ` burnus at gcc dot gnu dot org [this message]
2010-04-16 17:39 ` dominiq at lps dot ens dot fr
2010-04-16 18:26 ` kargl at gcc dot gnu dot org
2010-04-17 21:06 ` kargl at gcc dot gnu dot org
2010-04-17 22:13 ` kargl at gcc dot gnu dot org
2010-04-17 22:22 ` kargl at gcc dot gnu dot org

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=20100416172445.10519.qmail@sourceware.org \
    --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).