This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran, complex types, and STRICT_ALIGNMENT


On Wed, Jan 12, 2005 at 08:26:54AM -0500, James Morrison wrote:
>
> Right now in fortran/iresolve.c it is assumed that complex types can
> be used in places where integers twice the size of an element in the
> complex number can be used.

This sounds odd to me, and may indicate a bug.  Can you be
more specific with regards to a location where this 
assumption applies?

As far as alignment and padding, the only requirement 
in the Fortran standard is that sizeof(REAL) == sizeof(INTEGER)
and sizeof(COMPLEX) == 2 * sizeof(REAL) for the default
kinds.  AFAIK, the standard does not mandate anything about the
actual layout in memory.  If sizeof(REAL)=4 bytes, then sizeof(COMPLEX)
is 8 bytes, but those do not need to be 8 consecutive bytes in
memory.


-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]