aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-05-03 19:47:22 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-05-03 19:47:22 +0000
commit8f85525e4102574486728caf5e5aa3d91ab101e1 (patch)
treeedbdf6ee7b678c7d7daf005d8787b89e016bcbcf /gcc/ada
parent88f36b7eb6a153a914e9b4d678c1ddaddb842747 (diff)
downloadgcc-8f85525e4102574486728caf5e5aa3d91ab101e1.zip
gcc-8f85525e4102574486728caf5e5aa3d91ab101e1.tar.gz
gcc-8f85525e4102574486728caf5e5aa3d91ab101e1.tar.bz2
decl.c (components_to_record): Zero the alignment of the qualified union built for the variant part upon...
* decl.c (components_to_record): Zero the alignment of the qualified union built for the variant part upon creating it. From-SVN: r134917
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/decl.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 6da64b6..28cf5dc 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2008-05-03 Eric Botcazou <ebotcazou@adacore.com>
+ * decl.c (components_to_record): Zero the alignment of the qualified
+ union built for the variant part upon creating it.
+
+2008-05-03 Eric Botcazou <ebotcazou@adacore.com>
+
* decl.c (maybe_pad_type): Try to get a form of the type with integral
mode even if the alignment is not a factor of the original size. But
make sure to create the inner field with the original size. Reorder.
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 9d933b7..68ea42b 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -6322,6 +6322,7 @@ components_to_record (tree gnu_record_type, Node_Id component_list,
= make_node (unchecked_union ? UNION_TYPE : QUAL_UNION_TYPE);
TYPE_NAME (gnu_union_type) = gnu_union_name;
+ TYPE_ALIGN (gnu_union_type) = 0;
TYPE_PACKED (gnu_union_type) = TYPE_PACKED (gnu_record_type);
}