(j3.2006) (SC22WG5.3727) [ukfortran] Atomic stuff
Wed Dec 3 20:59:32 EST 2008
Jim Xia wrote:
> Now I take another look at the atomic stuff we worked out in Tokyo, I
> think there is an issue we didn't address: alignment. Consider on a
> system we have atomic_integer_kind being 4 bytes, and the processor
> also supports 2 byte integers, then the following declarations
> integer(2) x(3)
> integer(ATOMIC_INTEGER_KIND) y, z
> equivalence (y, x(2))
> equivalence (z, x)
> Now either y or z is out of natural alignment. This will certainly
> cause implementation problems on atomic operations on y and z. We
> have to disallow this to happen.
We did, 20 years ago (50 if you count from the beginning).
You are only allowed to change types/kinds in equivalence for the
type-kind combinations that F77 allowed it for, i.e.
as per the quoted Constraints by Nick. You are not even allowed to
equivalence double complex with double precision.
Any vendor who allows those as extensions can do whatever they like with
..........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3