This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Fortran, complex types, and STRICT_ALIGNMENT
- From: ja2morri at csclub dot uwaterloo dot ca (James Morrison)
- To: gcc at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 12 Jan 2005 08:26:54 -0500 (EST)
- Subject: Fortran, complex types, and STRICT_ALIGNMENT
Hi,
It looks like at least PR19294 is another fortran alignment issue. This
time with complex types. 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. You can see this in gfc_resolve_transpose
and gfc_resolve_reshape. So, I'm curious what the best way to fix this is:
1) On STRICT_ALIGNMENT targets align complex types to twice the alignment of
the inner type.
2) Set kind to 0 for complex types in gfc_resolve_{reshape,transpose} so that
the generic transpose/reshape call is made.
I think the first option would make the compiled code faster, but I don't know
if there is any down side to increasing the alignment.
--
Thanks,
Jim