Fortran, complex types, and STRICT_ALIGNMENT
James Morrison
ja2morri@csclub.uwaterloo.ca
Wed Jan 12 13:27:00 GMT 2005
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
More information about the Fortran
mailing list