This is the mail archive of the gcc-patches@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: RFC/Patch for PR fortran/17675


> From: ja2morri@csclub.uwaterloo.ca (James A. Morrison)
>
>  Since you have everything aligned already, you could put an assert
> in build_field like:
>         gcc_assert (known_align >= desired_align || !STRICT_ALIGNMENT);

This patch doesn't gaurentee that everything is aligned so I don't think
this assert would work, the code tries its best to align things but a
given set of equivelences can result in data that cannot be completely
aligned.  Like:

      real r1(5)
      double precision d1, d2
      equivalence (r1(1), d1)
      equivalence (r1(2), d2)

For machines where real is 4 byte aligned and 4 bytes in size and double
precision is 8 byte aligned and 8 bytes in size, then either d1 or d2
has to be misaligned.

Steve Ellcey
sje@cup.hp.com


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