aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-06-28 20:19:50 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-06-28 18:19:50 +0000
commit7ae2e72c93c2c5dfca4ecc64fcda12a558b4332c (patch)
tree52f564e4954e9dbb882c818eb2e2582dc71cc9c3 /gcc/stor-layout.c
parentde35da36f65b6a24badeb292ca1a1e4b989e52f0 (diff)
downloadgcc-7ae2e72c93c2c5dfca4ecc64fcda12a558b4332c.zip
gcc-7ae2e72c93c2c5dfca4ecc64fcda12a558b4332c.tar.gz
gcc-7ae2e72c93c2c5dfca4ecc64fcda12a558b4332c.tar.bz2
stor-layout.c (finish_builtin_struct): Copy fields into the variants.
* stor-layout.c (finish_builtin_struct): Copy fields into the variants. From-SVN: r212106
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 8fa4dc8..cfd436f 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -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)
{