This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]