Strange format error in g77
David Ronis
ronis@ronispc.chem.mcgill.ca
Tue Jul 13 10:48:00 GMT 1999
Hi I'm using
g77 version gcc-2.96 19990707 (experimental)
(from FSF-g77 version 0.5.25 19990628 (experimental))
to compile some fortran code. [For what follows I've used -O0 -g
-ffortran-bounds-check for options]. In my main program, I have lots
of loops inside of of which I put the following:
write(*,fmt=10,err=101)(s(ii),ii=1,2),
$ ((sum(ii,jj),jj=1,2),ii=1,2)
10 format(1x,2d13.5,5x,2d13.5/31x,2d13.5)
stop
101 stop 'write error'
s(2) and sum(2,2) are declared real*8. The debugger shows me calling
the write, but nothing is output. If I change the format to *, it
works. If I remove the stops, the program completes and outputs
reasonable(?) numbers (via other write(*,*) statements). I also get
the same behavior using egcs-1.1.2. Finally, if I simply lift out the
write and it's format and put it into a simple test program (with s
and sum initialized via a data statement), the resulting program
works.
Unfortunately, I don't have a small test case that shows the problem as
the progam depends quite heavily on a large precompiled library.
Any thoughts/suggestions?
David
More information about the Gcc-bugs
mailing list