www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/18/13:03:47

From: k1401ab AT lrz-muenchen DOT de ()
Newsgroups: comp.lang.fortran,comp.os.msdos.djgpp
Subject: Re: file handling bug - g77/djgpp
Date: 17 Jun 1997 12:56:20 GMT
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 34
Distribution: world
Message-ID: <5o61hk$g5b$1@sparcserver.lrz-muenchen.de>
References: <5o5eeb$n9m$1 AT sparcserver DOT lrz-muenchen DOT de>
NNTP-Posting-Host: sun1.lrz-muenchen.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

There seems to be a bug in g77-0.5.19 / djgpp: when an existing
(sequential) file is opened and the new output is smaller than the old
file size, then there usually will be some old 'trash' after the newly
written output at the end of the file. The problem can be avoided by
first opening, then closing with STATUS='DELETE', and then re-opening it
again. However, using that workaround with all files used in the legacy
program I'm working with, would be quite complex a task.

k1401ab AT lrz-muenchen DOT de () writes:

>The problem does not seem to occur when I compile the program with g77
>under UNIX (and also not with other Fortran compilers under DOS).

>Additional problems with file handling occurred when I tested whether the
>program can be built to run without FPU (using the -lemu). I tested the
>executable on my old 386-SX 2MB 16Mhz (with the cwsdmpi.exe), where some
>bizarre, 'non-reproducible' errors occurred: E.g., a file written in one
>step of the program, and successfully read in another, either disappeared
>entirely, or was filled with all H00 when it came to the final step where
>it should be read again. This error only occurred sometimes; when
>repeating the same steps again, everything seemed to be OK.  I should have
>mentioned that the 386-SX has Doublespace drives mounted, and the cwsdmpi
>swap-file is on such a drive. 

>Is what I'm describing a known bug in g77 / djgpp that is documented
>somewhere?
----
Peter Schmolck k1401ab AT sunmail DOT lrz-muenchen DOT de, p41bsmk AT rz DOT unibw-muenchen DOT de
Department of Education                         Phone :     +49-89-6004-2056
Univ. of the Federal Armed Forces Munich        Fax   :     +49-89-6004-3968
85577 NEUBIBERG, GERMANY    



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019