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: PR18173 - can't force alignment of global arrays with static initializer?


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~


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