This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/56737] [4.6/4.7/4.8/4.9 Regression] Wrong I/O result with format cache for Hollerith strings
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Mar 2013 19:32:32 +0000
- Subject: [Bug libfortran/56737] [4.6/4.7/4.8/4.9 Regression] Wrong I/O result with format cache for Hollerith strings
- Auto-submitted: auto-generated
- References: <bug-56737-4 at http dot gcc dot gnu dot 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 ====)