This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR18173 - can't force alignment of global arrays with static initializer?
- From: Richard Henderson <rth at redhat dot com>
- To: Dorit Naishlos <DORIT at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 Nov 2004 17:54:29 -0800
- Subject: Re: PR18173 - can't force alignment of global arrays with static initializer?
- References: <OF0EE172CB.AAF45097-ONC2256F55.006C9A80-C2256F55.006DE1D2@il.ibm.com>
On Tue, Nov 23, 2004 at 10:00:12PM +0200, Dorit Naishlos wrote:
> The question is - is it
> really impossible to force the alignment of such decls, or is it a bug that
> the setting of DECL_ALIGN doesn't work?
Your bug is here:
DECL_ALIGN (base) = TYPE_ALIGN (vectype);
DECL_USER_ALIGN (base) = TYPE_ALIGN (vectype);
DECL_USER_ALIGN is a boolean one bit field. Which, considering the
known value of the alignment, is going to always get set to zero.
That should be
DECL_USER_ALIGN (base) = 1;
r~