Comment 22 for bug 604874

Revision history for this message
Ulrich Weigand (uweigand) wrote :

Yes, this does indeed look like the root cause. With the following patch I'm getting correct behavior back:

--- gcc/cp/decl.c.orig 2010-07-28 19:26:52.000000000 +0200
+++ gcc/cp/decl.c 2010-07-28 19:28:13.000000000 +0200
@@ -2068,6 +2068,10 @@
       SET_DECL_INIT_PRIORITY (olddecl, DECL_INIT_PRIORITY (newdecl));
       DECL_HAS_INIT_PRIORITY_P (olddecl) = 1;
     }
+ /* Likewise for DECL_USER_ALIGN and DECL_PACKED. */
+ DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl);
+ if (TREE_CODE (newdecl) == FIELD_DECL)
+ DECL_PACKED (olddecl) = DECL_PACKED (newdecl);

   /* The DECL_LANG_SPECIFIC information in OLDDECL will be replaced
      with that from NEWDECL below. */