summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-08 19:43:07 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-08 19:43:07 +0000
commit9bf853bfc8dc47b82028c602e1766482ab26d28d (patch)
tree749e9a7b5e3c6ab85068c39d1abf2e1e538edd34 /gcc/stor-layout.c
parent03c2cf10c90e685a598a71ba8d1e044698d3d3f6 (diff)
downloadgcc-9bf853bfc8dc47b82028c602e1766482ab26d28d.tar.gz
* stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN
to unions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47796 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index a3d122f0500..05eaf247f39 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. */