This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: modification of g77 for default 64-bit integers on x86-64
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jiri Pittner <jiri dot pittner at jh-inst dot cas dot cz>
- Cc: fortran at sources dot redhat dot com
- Date: Tue, 30 Mar 2004 14:34:47 -0800
- Subject: Re: modification of g77 for default 64-bit integers on x86-64
- References: <200403302217.i2UMHsDs029625@jp.jh-inst.cas.cz>
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