OSDN Git Service

PR target/23071
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Mar 2010 23:13:10 +0000 (23:13 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 00:32:51 +0000 (09:32 +0900)
* config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
Don't overly align based upon packed packed fields.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157654 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index f8515cd..e1bd54a 100644 (file)
@@ -1,3 +1,9 @@
+2010-03-22  Mike Stump  <mikestump@comcast.net>
+
+       PR target/23071
+       * config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
+       Don't overly align based upon packed packed fields.
+
 2010-03-22  Jason Merrill  <jason@redhat.com>
 
        * c-pretty-print.c (pp_c_specifier_qualifier_list) [VECTOR_TYPE]:
 2010-03-22  Jason Merrill  <jason@redhat.com>
 
        * c-pretty-print.c (pp_c_specifier_qualifier_list) [VECTOR_TYPE]:
index dea0271..ab48e82 100644 (file)
@@ -4653,6 +4653,9 @@ darwin_rs6000_special_round_type_align (tree type, unsigned int computed,
       field = TREE_CHAIN (field);
     if (! field)
       break;
       field = TREE_CHAIN (field);
     if (! field)
       break;
+    /* A packed field does not contribute any extra alignment.  */
+    if (DECL_PACKED (field))
+      return align;
     type = TREE_TYPE (field);
     while (TREE_CODE (type) == ARRAY_TYPE)
       type = TREE_TYPE (type);
     type = TREE_TYPE (field);
     while (TREE_CODE (type) == ARRAY_TYPE)
       type = TREE_TYPE (type);