This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix alignment handling in merge_decls()
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jan Beulich" <jbeulich at novell dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 27 Feb 2008 10:41:01 +0100
- Subject: Re: [PATCH] fix alignment handling in merge_decls()
- References: <47C52110.76E4.0078.0@novell.com>
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);
> }
> }
>
>
>
>
>