[Info-vax] Alpha Fortran data alignment

Steven Schweda sms.antinode at gmail.com
Tue Aug 31 15:40:39 EDT 2010


On Aug 31, 2:00 pm, tadamsmar <tadams... at yahoo.com> wrote:
> I was checking the locations of variables.

   Why do you care?

> It appear that 8 bytes are allocated for an integer*2 and 4 bytes are
> allocated for a real*4

   It may appear that way.

> Why is this?

   Why not?  Is anything not aligned properly?  If you want
data packed tightly, then you should tell the compiler that.
If you don't tell the compiler how to allocate the storage,
then it's free to do whatever it wants, isn't it?

> But if I change prmidx to real*4 in main and real*8 in
> the sub, I get:

   What was the point in giving the wrong size to the
subroutine?  (Or did you want the wrong answer?)



More information about the Info-vax mailing list