2011-06-23  Andrew Burgess  <aburgess@broadcom.com>
	* gdbtypes.c (append_composite_type_field_aligned): Fix
	calculation of bit position based on alignment.
+2011-06-23  Andrew Burgess  <aburgess@broadcom.com>
+
+       * gdbtypes.c (append_composite_type_field_aligned): Fix
+       calculation of bit position based on alignment.
+
 2011-06-22  Pedro Alves  <pedro@codesourcery.com>
 
        * breakpoint.c (bpstat_stop_status): Call the check_status
 
 
          if (alignment)
            {
-             int left = FIELD_BITPOS (f[0]) % (alignment * TARGET_CHAR_BIT);
+             int left;
+
+             alignment *= TARGET_CHAR_BIT;
+             left = FIELD_BITPOS (f[0]) % alignment;
 
              if (left)
                {
-                 FIELD_BITPOS (f[0]) += left;
-                 TYPE_LENGTH (t) += left / TARGET_CHAR_BIT;
+                 FIELD_BITPOS (f[0]) += (alignment - left);
+                 TYPE_LENGTH (t) += (alignment - left) / TARGET_CHAR_BIT;
                }
            }
        }