public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/56737] [4.6/4.7/4.8/4.9 Regression] Wrong I/O result with format cache for Hollerith strings
Date: Wed, 27 Mar 2013 19:32:00 -0000	[thread overview]
Message-ID: <bug-56737-4-lQwS9ZCtZB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56737-4@http.gcc.gnu.org/bugzilla/>


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.3.4, 4.4.0
           Keywords|                            |wrong-code
   Last reconfirmed|                            |2013-03-27
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |jvdelisle at gcc dot
                   |                            |gnu.org
     Ever Confirmed|0                           |1
            Summary|Bizarre Hollerith edit      |[4.6/4.7/4.8/4.9
                   |descriptor errors (valgrind |Regression] Wrong I/O
                   |shows uninitialized value   |result with format cache
                   |in libgfortran)             |for Hollerith strings
   Target Milestone|---                         |4.6.4
      Known to fail|                            |4.5.3, 4.6.3, 4.7.2, 4.8.0,
                   |                            |4.9.0

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-03-27 19:32:32 UTC ---
Seems to be a regression in libgfortran. It works with gfortran 4.3 and 4.4,
but fails with gfortran 4.5 to 4.9.

(Compiling with 4.9 and running with libgfortran 4.3 works, i.e. the regression
must be in libgfortran.)

It works if one disables the format cache.



If one adds some debugging output to write_constant_string, one sees that for
the second call, the delimiter (f->u.string.p[-1]) is not 'H' - and the first
6H is also wrong.

write_constant_string: len=1: f->u.string.p=' '- delim='H'
write_constant_string: len=1: f->u.string.p=' '- delim='H'
write_constant_string: len=1: f->u.string.p=' '- delim='H'
write_constant_string: len=6: f->u.string.p='===== '- delim='h'
write_constant_string: len=6: f->u.string.p=' ====='- delim='h'
   ===== end of level   1 =====
write_constant_string: len=1: f->u.string.p=' '- delim=' '
write_constant_string: len=1: f->u.string.p=' '- delim=' '
write_constant_string: len=1: f->u.string.p=' '- delim=' '
write_constant_string: len=6: f->u.string.p='      '- delim=' '
write_constant_string: len=6: f->u.string.p=' ====='- delim=' '
         end of level   1 ====)


  reply	other threads:[~2013-03-27 19:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 11:46 [Bug libfortran/56737] New: Bizarre Hollerith edit descriptor errors (valgrind shows uninitialized value in libgfortran) jonathan.hogg at stfc dot ac.uk
2013-03-27 19:32 ` burnus at gcc dot gnu.org [this message]
2013-03-27 20:24 ` [Bug libfortran/56737] [4.6/4.7/4.8/4.9 Regression] Wrong I/O result with format cache for Hollerith strings burnus at gcc dot gnu.org
2013-03-28 10:00 ` burnus at gcc dot gnu.org
2013-03-29  9:38 ` burnus at gcc dot gnu.org
2013-03-29  9:40 ` burnus at gcc dot gnu.org
2013-04-02 15:43 ` burnus at gcc dot gnu.org
2013-04-03 10:15 ` rguenth at gcc dot gnu.org
2013-04-03 14:02 ` burnus at gcc dot gnu.org
2013-04-03 14:07 ` burnus at gcc dot gnu.org
2013-04-04  9:32 ` burnus at gcc dot gnu.org
2013-04-04  9:38 ` burnus at gcc dot gnu.org
2013-04-04 10:43 ` jonathan.hogg at stfc dot ac.uk

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-56737-4-lQwS9ZCtZB@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).