[Info-vax] Alpha Fortran data alignment
tadamsmar
tadamsmar at yahoo.com
Tue Aug 31 15:00:56 EDT 2010
I was checking the locations of variables.
If I run this:
integer*2 prmidx
real*4 vlu
prmidx = 1
vlu = 10000000
call sub(prmidx,%loc(prmidx),%loc(vlu))
end
subroutine sub(prmidx,lp,lv)
integer*4 prmidx,lv,lp
type *,prmidx,lp,lv
end
1 196608 196616
But if I change prmidx to real*4 in main and real*8 in
the sub, I get:
128.000036285423 196608 196612
It appear that 8 bytes are allocated for an integer*2 and 4 bytes are
allocated for a real*4
Why is this?
Thanks!
More information about the Info-vax
mailing list