modification of g77 for default 64-bit integers on x86-64
Jiri Pittner
jiri.pittner@jh-inst.cas.cz
Tue Mar 30 23:14:00 GMT 2004
|orion:/home/jiri> cat test13.f
program maybe_bug
integer i
real x,y
equivalence(i,x)
common /important/ y
y=123.
x=456.
write(6,*)y
i=1234567890
write(6,*)y
end
|orion:/home/jiri> g77 test13.f
|orion:/home/jiri> a.out
123.
123.
|orion:/home/jiri> g77_64 test13.f
|orion:/home/jiri> a.out
123.
123.
This seems to work ok - the compiler will place i,x on stack and only y in common
Of course, if both x,y would be in the common, then y will be overwritten,
but this I think the user has to take care about, if he wants to enlarge integers.
Actually, before I posted the announcement, I compiled already an application program
consisting of approx. 300000 lines and it computes correct numbers. However, that
program was written with 64-bit integers on mind (originally for Cray) and I ported it
to 64-bit workstation (HP) a few years ago.
Jiri
More information about the Fortran
mailing list