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: [PATCH] fix alignment handling in merge_decls()


On Wed, Feb 27, 2008 at 8:36 AM, Jan Beulich <jbeulich@novell.com> wrote:
> Since this change was in my local patch set for several years, I don't
>  recall how it was spotted; therefore I can't present a testcase for it.
>  Nevertheless, even if the change isn't the one really needed here, it
>  is clearly wrong to initialize/update a single-bit field from a
>  multi-bit one.
>
>  Built and tested on i686-pc-linux-gnu and x86_64-unknown-linux-gnu.

Duh.  Ok.

Thanks,
Richard.

>  gcc/
>  2008-02-27  Jan Beulich  <jbeulich@novell.com>
>
>         * c-decl.c (merge_decls): Use DECL_USER_ALIGN() on olddecl to
>         update the respective field on newdecl.
>
>  --- 2008-02-25/gcc/c-decl.c     2008-02-22 10:54:49.000000000 +0100
>  +++ 2008-02-25/gcc/c-decl.c     2008-02-26 09:37:21.000000000 +0100
>  @@ -1667,7 +1667,7 @@ merge_decls (tree newdecl, tree olddecl,
>        if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl))
>         {
>           DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl);
>  -         DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl);
>  +         DECL_USER_ALIGN (newdecl) |= DECL_USER_ALIGN (olddecl);
>         }
>      }
>
>
>
>
>


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