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]

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


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