DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de
Thu Apr 10 07:20:00 GMT 2003


Richard Kenner wrote:

>     But this does not solve my problem that Ada does not
>     bootstrap; for some reason the Ada frontend sets the
>     USER_ALIGN flag for a huge number of variables, even
>     those that were defined without any special 'Alignment
>     attributes ...
> 
> That's because the front end will specify the alignment of some variables.
> But what does that have to with failure to bootstrap?

Well, as I said, this behaviour of the Ada front end causes
global variables to be generated that have a forced 1-byte
alignment (which up to now never happened with any other
frontend, even though theoretically possible).

Because varasm.c ignores the backend's DATA_ALIGNMENT macro
for variables with forced alignment, this means that labels
end up being generated on odd addresses; the s390 backend
(in 64-bit mode) generates code that assumes this never
happens and will fail if this assumption is violated.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gcc mailing list