modification of g77 for default 64-bit integers on x86-64

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Mar 30 22:34:00 GMT 2004


On Tue, Mar 30, 2004 at 05:17:54PM -0500, Jiri Pittner wrote:
> 
> I would like to announce a modification of the g77 compiler to generate
> integers 8 byte (64 bit) long by default. The motivation for this work are the
> AMD Opteron (x86-64) processors. For me it becomes essential to be able to use
> large old Fortran application programs on this new architecture and have integer
> variables (implicit ones as well as the ones declared as integer without length)
> 64-bit sized to exploit fully the new processor.
> Furtherermore I wanted to avoid using commercial compilers (e.g. PGI) which
> offer this feature (-i8 option), due to both financial reasons and free software principle.
> 

gfortran has a -i8 option, but I not sure if it currently works.
As far as g77, you need to adjust the widths of REAL, DOUBLE PRECISION,
and COMPLEX, if you want expand the width of the default integer kind.
Otherwise, this previously conforming code may cause some serious ugly
bugs.

    program trouble
    integer i
    real    x(2)
    double precision d
    equivalence(i,x(1))
    equivalence(x,d)
    .....
    end

-- 
Steve



More information about the Fortran mailing list