From: Jan Hubicka Date: Sat, 28 Jun 2014 18:19:50 +0000 (+0200) Subject: stor-layout.c (finish_builtin_struct): Copy fields into the variants. X-Git-Tag: releases/gcc-5.1.0~6603 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ae2e72c93c2c5dfca4ecc64fcda12a558b4332c;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 148477d36b48..245c20d66fb7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-06-28 Jan Hubicka + + * stor-layout.c (finish_builtin_struct): Copy fields into + the variants. + 2014-06-28 Ulrich Weigand * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Revert diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 8fa4dc884b11..cfd436fe82ba 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) {