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 staticinitializer?





> That should be
>
>       DECL_USER_ALIGN (base) = 1;

Thanks. I'll fix that.
It doesn't fix the alignment forcing problem though...

thanks,
dorit




                                                                                                                                                
                      Richard Henderson                                                                                                         
                      <rth@redhat.com>         To:       Dorit Naishlos/Haifa/IBM@IBMIL                                                         
                                               cc:       gcc-patches@gcc.gnu.org                                                                
                      24/11/2004 03:54         Subject:  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]