aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2001-12-08 19:43:07 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2001-12-08 14:43:07 -0500
commit79dc3d44fbb3e5461396f95725eab5b442c7d9a8 (patch)
tree749e9a7b5e3c6ab85068c39d1abf2e1e538edd34
parent78e7853794e3f161805694034afb628de9345461 (diff)
downloadgcc-79dc3d44fbb3e5461396f95725eab5b442c7d9a8.zip
gcc-79dc3d44fbb3e5461396f95725eab5b442c7d9a8.tar.gz
gcc-79dc3d44fbb3e5461396f95725eab5b442c7d9a8.tar.bz2
stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN to unions.
* stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN to unions. From-SVN: r47796
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stor-layout.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d66fb52..799f445 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-08 David Edelsohn <edelsohn@gnu.org>
+
+ * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN
+ to unions.
+
2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
* c-parse.in: Take string literals in assembler constructs,
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index a3d122f..05eaf24 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -658,6 +658,10 @@ place_union_field (rli, field)
MIN (desired_align, (unsigned) BIGGEST_FIELD_ALIGNMENT);
#endif
+#ifdef ADJUST_FIELD_ALIGN
+ desired_align = ADJUST_FIELD_ALIGN (field, desired_align);
+#endif
+
TYPE_USER_ALIGN (rli->t) |= DECL_USER_ALIGN (field);
/* Union must be at least as aligned as any field requires. */