diff options
Diffstat (limited to 'gcc-4.6/gcc/cp/decl.c')
-rw-r--r-- | gcc-4.6/gcc/cp/decl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc-4.6/gcc/cp/decl.c b/gcc-4.6/gcc/cp/decl.c index ff3baa54b..69595a97b 100644 --- a/gcc-4.6/gcc/cp/decl.c +++ b/gcc-4.6/gcc/cp/decl.c @@ -2156,7 +2156,12 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) SET_DECL_INIT_PRIORITY (olddecl, DECL_INIT_PRIORITY (newdecl)); DECL_HAS_INIT_PRIORITY_P (olddecl) = 1; } - /* Likewise for DECL_USER_ALIGN and DECL_PACKED. */ + /* Likewise for DECL_ALIGN, DECL_USER_ALIGN and DECL_PACKED. */ + if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) + { + DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); + DECL_USER_ALIGN (newdecl) |= DECL_USER_ALIGN (olddecl); + } DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl); if (TREE_CODE (newdecl) == FIELD_DECL) DECL_PACKED (olddecl) = DECL_PACKED (newdecl); |