public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl 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 18:26:00 -0000 [thread overview]
Message-ID: <20100416182544.32610.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31538-13404@http.gcc.gnu.org/bugzilla/>
------- Comment #10 from kargl at gcc dot gnu dot org 2010-04-16 18:25 -------
(In reply to comment #9)
> The run time error for
>
> i = 0
> a(i:1) = b(0:4)
>
> is
>
> At line 9 of file pr31538_db_2.f90
> Fortran runtime error: Array bound mismatch, size mismatch for dimension 1 of
> array 'a' (2/5)
>
> for
>
> i = 0
> a(i:1) = f(b)
>
> it is
>
> At line 14 of file pr31538_db.f90
> Fortran runtime error: Array bound mismatch for dimension 1 of array 'f'
>
> In my opinion also the second case should produce an error similar to the first
> ones.
>
How's this?
Unpatched gfortran:
laptop:kargl[205] gfc4x -o z -fcheck=bounds g.f90
laptop:kargl[206] ./z
At line 9 of file g.f90
Fortran runtime error: Array bound mismatch for dimension 1 of array 'f'
With a new patch:
laptop:kargl[211] gfc4x -o z -fcheck=bounds g.f90
laptop:kargl[212] ./z
At line 9 of file g.f90
Fortran runtime error: Dimension 1 of array 'f' has extent 5 instead of 6
laptop:kargl[213]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31538
next prev parent reply other threads:[~2010-04-16 18:26 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
2010-04-16 17:39 ` dominiq at lps dot ens dot fr
2010-04-16 18:26 ` kargl at gcc dot gnu dot org [this message]
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=20100416182544.32610.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).