This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/34887] reverse tabbing before slash descriptor (regression vs. g77)
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2008 00:53:56 -0000
- Subject: [Bug libfortran/34887] reverse tabbing before slash descriptor (regression vs. g77)
- References: <bug-34887-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2008-01-25 00:53 -------
What it does is stated in the comment.
/* If the farthest position reached is greater than current
position, adjust the position and set length to pad out
whats left. Otherwise just pad whats left.
(for character array unit) */
IIRC that comment needs to be repeated down below. The bytes that are
"allocated" have been already written to previously. We know this from
max_pos. All this is doing is moving the file position back out the necessary
number of bytes and assuring they get flushed out to disk later. If we just do
a seek, we may skip over bytes and not write them to disk. This also assures
that those bytes are marked dirty.
Its really not horrible once you understand it. I am not convinced the if
(done) is needed at line 2579 though. Have to think some more. Maybe try
taking the condition away and see what happens.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34887