On Sat, Feb 07, 2004 at 12:57:48PM -0600, Randy Clarksean wrote: > > I am trying to compile a legacy FORTRAN 77 code with g77 on a > RH7.2 Linux box. I am ending up with some errors that deal > with common blocks. the general form of the message is shown > below. > > common block XYZ is AA bytes at (1) and BB bytes at (2) > > Yes ... I know the problem is sloppy programming where they > just didn't fill out the rest of the common block in the second > location with enough variables so that the common blocks match > up identically. The code is MUCH too long (~40,000 lines) to > go in and clean them up ... I literally get 100's of messages. If you are going to have to use this code for long, I would go in a and fix these errors. I have had to do this for code that is almost as big as yours, and its no fun, but it drastically improves maintainability. If you do try to fix this, use include files so that you don't have to change common blocks in dozens of different places. > I have done google searches, gone to gnu.org and looked through > the gcc site ... with no luck. Anyone out there have any > suggestions? I have tried running it with -Wno-common ... but > that seems to make no difference either. Seems like there > should be a way to get past these annoying warnings/errors. I don't see anyway to do this with g77 either. Unfortunately g77 is not a very good Fortran compiler. > On a Win2000 system, I can turn the warnings off and it > compiles, but does not link because of a bunch of system > specific calls that (timing routines, etc.) that I could just > delete, etc. It was a Digital Visual Fortran (like version > 6.5) on the Win2000 system. I would suggest trying a different compiler [1]. I would suggest starting the Intel Fortran Compiler [2]. You should be able to try it out for free, and depending on your needs you may be able to use it permanently for free. I don't know for sure that it has options that will fix your problem, but I know that the Intel compiler is much better than g77. BTW, this message would have been on-topic for the (very low traffic) tclug-devel list. Though my guess is there are not many other Fortran people on that list either. http://www.nikhef.nl/~templon/fortran.html http://www.intel.com/software/products/compilers/flin/ -- Jim Crumley |Twin Cities Linux Users Group Mailing List (TCLUG) crumley at fields.space.umn.edu |Minneapolis/St. Paul, Minnesota Ruthless Debian Zealot |http://www.mn-linux.org/ Never laugh at live dragons |Dmitry's free,Jon's next? http://faircopyright.org _______________________________________________ TCLUG Mailing List - Minneapolis/St. Paul, Minnesota http://www.mn-linux.org tclug-list at mn-linux.org https://mailman.real-time.com/mailman/listinfo/tclug-list