COMMON padding warning

Jakub Jelinek jakub@redhat.com
Tue Oct 18 20:26:00 GMT 2005


Hi!

On:

common /blk/ x, p
integer, target :: x
integer, pointer :: p
end

gfortran warns on 64-bit arches:
Warning: COMMON 'data' at (1) requires 4 bytes of padding at start

x is 4 bytes here, p is 8 bytes.
Can anyone enlighten me:
1) why is x aligned up in the COMMON block rather than down
2) what's the purpose of this warning - is the user doing anything
   wrong?  The C compiler certainly doesn't warn when it inserts
   padding anywhere, it is just a part of the target's ABI

Thanks.

	Jakub



More information about the Fortran mailing list