]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stor-layout.c (finish_builtin_struct): Copy fields into the variants.
authorJan Hubicka <hubicka@ucw.cz>
Sat, 28 Jun 2014 18:19:50 +0000 (20:19 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 28 Jun 2014 18:19:50 +0000 (18:19 +0000)
* stor-layout.c (finish_builtin_struct): Copy fields into
the variants.

From-SVN: r212106

gcc/ChangeLog
gcc/stor-layout.c

index 148477d36b48f8874a78b38327357acd04e8c7d4..245c20d66fb7f06487c6356296470fc2bf34f768 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-28  Jan Hubicka  <hubicka@ucw.cz>
+
+       * stor-layout.c (finish_builtin_struct): Copy fields into
+       the variants.
+
 2014-06-28  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Revert
index 8fa4dc884b113eeb8e22afe0ab2806cc947ef6a5..cfd436fe82ba4bea3d72868db46c92243ed81630 100644 (file)
@@ -2065,7 +2065,7 @@ void
 finish_builtin_struct (tree type, const char *name, tree fields,
                       tree align_type)
 {
-  tree tail, next;
+  tree tail, next, variant;
 
   for (tail = NULL_TREE; fields; tail = fields, fields = next)
     {
@@ -2074,6 +2074,10 @@ finish_builtin_struct (tree type, const char *name, tree fields,
       DECL_CHAIN (fields) = tail;
     }
   TYPE_FIELDS (type) = tail;
+  for (variant = TYPE_MAIN_VARIANT (type);
+       variant != 0;
+       variant = TYPE_NEXT_VARIANT (variant))
+    TYPE_FIELDS (variant) = tail;
 
   if (align_type)
     {