diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-02-14 07:15:35 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-02-14 07:15:35 +0100 |
commit | 45f41865ff05c95063563c5c0e2e4306c40f08a7 (patch) | |
tree | 8eb32a64dbd1fd610d6b8ec9aceff9719e62f75f /gcc/c-decl.c | |
parent | 1380aca7e6219817086aaacf9b264cf4b5a84727 (diff) | |
download | gcc-45f41865ff05c95063563c5c0e2e4306c40f08a7.zip gcc-45f41865ff05c95063563c5c0e2e4306c40f08a7.tar.gz gcc-45f41865ff05c95063563c5c0e2e4306c40f08a7.tar.bz2 |
re PR c/52181 (merge_decls doesn't handle DECL_USER_ALIGN properly)
PR c/52181
* c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to
newdecl.
* decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
* c-c++-common/pr52181.c: New test.
From-SVN: r184193
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 4825c7e..93fb16d 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1,6 +1,6 @@ /* Process declarations and variables for C compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -2449,6 +2449,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype) memcpy ((char *) olddecl + sizeof (struct tree_common), (char *) newdecl + sizeof (struct tree_common), sizeof (struct tree_decl_common) - sizeof (struct tree_common)); + DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl); switch (TREE_CODE (olddecl)) { case FUNCTION_DECL: |