Weird compiler problem with g77
Toon Moene
toon@moene.indiv.nluug.nl
Thu Apr 26 13:04:00 GMT 2001
Joseph Mildenberger <Joe.Mildenberger@triumf.ca> wrote:
> To whom it may concern:
> Please find attached a gzipped tar file containing source code,
> "make" and "run" scripts, and necessary auxilliary files (calibrations,
> etc.) described in yesterday's message, to demonstrate to bug I
> described.
> Instructions:
> 1. Download attachment ; gunzip weird_bug.tar.gz ; tar xvf weird_bug.tar
> 2. cd temp
> (new directory created for tar archive contents)
> 3. Compile code via "make_executable" (c-shell script)
> 4. Run executable via "run_ntskim" (c-shell script)
Well, this probably didn't make it to the list (it has a 200K limit).
Sorry, I meant to write you to make it available on a web page, so that
I could pick it up. However, it did arrive in my mailbox (all 8516169
bytes of it :-) successfully. Unfortunately, make_executable fails at
the third source file:
f77 -c -O -ffixed-line-length-132 -fdollar-ok -fno-globals
-fno-automatic -fno-second-underscore -Wno-globals -I. -DUNIX -DLINUX
-DG77 evtsel_user.F
In file included from evtsel_user.F:8:
evtsel_user_declare.inc: In subroutine `evtsel_user':
evtsel_user_declare.inc:1:
include '/sitka/home2/e787/pass2/98/anal/include/scaler2.inc'
^
Unable to open INCLUDE file
`/sitka/home2/e787/pass2/98/anal/include/scaler2.inc' at (^)
Note the hard-coded path (and two others - I repaired them by hand).
Then:
f77 -c -O -ffixed-line-length-132 -fdollar-ok -fno-globals
-fno-automatic -fno-second-underscore -Wno-globals -I. -DUNIX -DLINUX
-DG77 unixfi.F
make: *** No rule to make target `summary_nt_dummy.o
At this point I gave up. I don't know how to proceed.
Some things to try at home:
1. Add -finit-local-zeros to the FFLAGS
This will start of all unitialised variables with zero - a common
but mistaken assumption in Fortran code.
2. Add -fbounds-check to the FFLAGS
This will add checking code for array bound overruns.
Success !
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
More information about the Gcc-bugs
mailing list