This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Strange format error in g77
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Strange format error in g77
- From: David Ronis <ronis at ronispc dot chem dot mcgill dot ca>
- Date: Tue, 13 Jul 1999 13:47:53 -0400
- Reply-to: ronis at onsager dot chem dot mcgill dot ca
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