This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: 10 Apr 2003 09:18:40 -0700
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- References: <200304100040.CAA24017@faui11.informatik.uni-erlangen.de><200304101527.RAA07154@faui11.informatik.uni-erlangen.de>
Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de> writes:
> However, Ada bootstrap still fails, because it uses
> inconsistent alignment flags for the same symbol between
> different translation units: the elaboration check flag
> variables are defined from within Ada sources, and marked
> as forced 1-byte aligned there, but they are *referenced*
> from within auto-generated C sources, and are declared
> simply as 'extern char xxx;' there, without any forced
> alignment specification.
>
> This means that when compiling the C source that references
> the variables, I do not know that they are in fact 1-byte
> aligned. Do you think the backend should be able to cope
> with even this scenario, or would you consider this a
> frontend bug?
I'd consider this a bug *somewhere*. I'd think that if the Ada
frontend is going to do this, then in the C sources the variables need
to be marked with the appropriate alignment.
--
- Geoffrey Keating <geoffk at geoffk dot org>