diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-09 09:41:16 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-09 09:41:16 +0000 |
commit | e197d74aa16b9ebf35e8d3c9d3ad12c7dfb10e13 (patch) | |
tree | cf96aab5ea1b9dabffded7ef9da2d17a1a7f95b0 /gcc/ada | |
parent | 83d2008b455f2d471bfd3d4cc051ccf3b2124912 (diff) | |
download | gcc-e197d74aa16b9ebf35e8d3c9d3ad12c7dfb10e13.tar.gz |
* decl.c (components_to_record): Adjust the packedness for the
qualified union as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136583 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/decl.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0fcead3c2e7..29a20718ee8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2008-06-09 Eric Botcazou <ebotcazou@adacore.com> + + * decl.c (components_to_record): Adjust the packedness for the + qualified union as well. + 2008-06-09 Arnaud Charlet <charlet@adacore.com> * Make-lang.in: Use -gnatwns instead of -gnatws to make sytyle diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 01827b47561..b8bcb4bc85d 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -6461,6 +6461,8 @@ components_to_record (tree gnu_record_type, Node_Id component_list, /* Only make the QUAL_UNION_TYPE if there are any non-empty variants. */ if (gnu_variant_list) { + int union_field_packed; + if (all_rep_and_size) { TYPE_SIZE (gnu_union_type) = TYPE_SIZE (gnu_record_type); @@ -6482,9 +6484,13 @@ components_to_record (tree gnu_record_type, Node_Id component_list, return; } + /* Deal with packedness like in gnat_to_gnu_field. */ + union_field_packed + = adjust_packed (gnu_union_type, gnu_record_type, packed); + gnu_union_field = create_field_decl (gnu_var_name, gnu_union_type, gnu_record_type, - packed, + union_field_packed, all_rep ? TYPE_SIZE (gnu_union_type) : 0, all_rep ? bitsize_zero_node : 0, 0); |