------- 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