>> Still, I can't completely stifle my curiosity about the g77 problems.  Is
>> there a utility out there that checks FORTRAN code for f77 compliance?
>
> The best test is to run it through f2c. f2c *is* nothing else than the
> f77 'authority', believe me.

I _like_ f2c but I would'nt go quite that far. Another tool with better
diagnostic output is

        <http://www.dsm.fordham.edu/~ftnchek/>

Source code (C) and compiled executables for a number of systems are
available.

When I run ftnchek on pmx217.for with no options I get a lot of (mostly)
harmless warning messages, but

  ftnchek -pretty=none -truncation=none -f77=none -f77=mixed-common *.for

gives a few error messages like 

  Warning in module PMXA file pmx217.for:
   Common block COMMAC line 478 has mixed
   character and non-character variables (nonstandard)

The offending source line is

      common /commac/ macnum,mrecord,mplay,macuse,icchold,lnholdq,endmac

with character*128 lnholdq and logical endmac. Since different compilers
store character variables differently, trying to access non-character data
located in common after the character data can lead to memory errors. I
suspect that this is what you are seeing. The solution (best case) would be
to segregate character variables into their own commons, but (next best)
moving the character variables in commons to the end would probably solve
the problem.

HTH,
        Eric
+------------------------------------------------------------------------+
| Eric Petersen, University of Minnesota             (Home) 612-533-2654 |
| Dept of Aerospace Engineering and Mechanics               612-624-3516 |
| Minnesota Supercomputer Institute                         612-624-1524 |
| [EMAIL PROTECTED], [EMAIL PROTECTED]                             |
| http://www.aem.umn.edu/people/students/epeterse/                       |
+------------------------------------------------------------------------+

Reply via email to