[prog] compiling (or failing to) old fortran on linux
Shirrell
shirrell at pstat.com
Tue Sep 7 16:52:48 EST 2004
Conor Daly wrote:
>Hi all,
>
>I have a (biggish) number of fortran programs on a solaris machine that I
>want to compile on a linux system. There is the added complication of some
>embedded SQL routines so a precompiler parses the fortran first. The
>sequence of the solaris machine is:
>
>esqlc <source>.sf
> (produces <source>.f
>
>f77 -fast -xO5 <source>.f /users/ingres/lib/*.a -lelf -lm -lnsl -lsocket
>
>and all works fine. However, when I try to compile on an RH9 box using:
>
>esqlc <source>.sf
> (produces <source>.f
>
>g77 $user.f -L${II_SYSTEM}/ingres/lib -lingres -lm -ldl -lrt
>
>I get the following errors:
>
> type 935,razer
> ^
>Unsupported VXT statement at (^)
>
>
Every Fortran has its own little extensions and Solaris is on the
permissive side
with some early f90 features. g77 tends to stick to the standard.
>
> 2027 format (x,i2,i10,i10,' Smd:',i7,' ','Diff: ',i5,
>
>
While I can't be much help the '(x,' without a size specifier such as
1x is certainly not vanilla Fortran and I have
found that g77 is less permissive that f77.
> ^
>Invalid X specifier in FORMAT statement at (^) -- correct form: nX
>
> if((ans.eq.'n').or.(ans.eq.'N')) then
> 1 2
>Equality operator at (1) must operate on two scalar (not array)
>subexpressions, two function invocations returning arithmetic or character
>scalars, or a combination of both -- but the subexpression at (2) is an
>array
>
How is ans declared -- this looks ok if it is something like
character*n ans
>
> if (zwdif.lt.0) signw = '-'
> 1 2
>Type disagreement between expressions at (1) and (2)
>
>
>
Again, how is signw declared: If it is character*n it should be ok on
g77. I don't
think switches will help. We move Fortran code from solaris to g77 all
the time
and compile without switches.
>Does anyone know the correct switches for g77 to make this stuff compile?
>(-fvxt -fvxt-intrinsics-enable) doesn't seem to make a difference...
>
>Thanks,
>
>Conor
>
Regards,
Shirrell at pstat.com
>
>
More information about the Programming
mailing list