public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/43155] Reading real numbers of the form "123+ 44" (with space) Date: Wed, 24 Feb 2010 04:01:00 -0000 [thread overview] Message-ID: <20100224040106.16226.qmail@sourceware.org> (raw) In-Reply-To: <bug-43155-13404@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from jvdelisle at gcc dot gnu dot org 2010-02-24 04:01 ------- Here is the fix: Index: transfer.c =================================================================== --- transfer.c (revision 156986) +++ transfer.c (working copy) @@ -926,7 +926,7 @@ require_type (st_parameter_dt *dtp, bt expected, b return 0; sprintf (buffer, "Expected %s for item %d in formatted transfer, got %s", - type_name (expected), dtp->u.p.item_count, type_name (actual)); + type_name (expected), dtp->u.p.item_count - 1, type_name (actual)); format_error (dtp, f, buffer); return 1; The reason this is the right fix is that for formatted transfers, the loop that calls the transfers is executed an initial time to set up the transfer and then looped throughthe items. Item count is always one greater. We could initialize it to -1, but why bother, the dtp structure is zeroed when created. The above is the minimal fix. I will add a comment to explain this when I commit. Regression tests OK. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43155
next prev parent reply other threads:[~2010-02-24 4:01 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-02-23 20:58 [Bug fortran/43155] New: " burnus at gcc dot gnu dot org 2010-02-23 21:28 ` [Bug fortran/43155] " kargl at gcc dot gnu dot org 2010-02-24 2:55 ` jvdelisle at gcc dot gnu dot org 2010-02-24 4:01 ` jvdelisle at gcc dot gnu dot org [this message] 2010-02-24 7:06 ` burnus at gcc dot gnu dot org 2010-02-25 5:52 ` jvdelisle at gcc dot gnu dot org 2010-02-27 19:26 ` [Bug fortran/43155] I/O error message: Off-by one position of edit descriptor burnus 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=20100224040106.16226.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: linkBe 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).