aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-10-26 20:45:09 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-10-26 20:45:09 +0000
commite1e5852c9f5e3c4327b0dbfbd255145a3702ff6b (patch)
tree2606ea3bdeadfef64ff3f764e8555b8d5436c052 /gcc/ada/gcc-interface/trans.c
parent0025cb638168df0f3d7a845fa9e11a308a719b05 (diff)
downloadgcc-e1e5852c9f5e3c4327b0dbfbd255145a3702ff6b.zip
gcc-e1e5852c9f5e3c4327b0dbfbd255145a3702ff6b.tar.gz
gcc-e1e5852c9f5e3c4327b0dbfbd255145a3702ff6b.tar.bz2
decl.c (gnat_to_gnu_entity): Try to make a packable type for fields of union types as well.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Try to make a packable type for fields of union types as well. <is_type>: Use RECORD_OR_UNION_TYPE_P predicate. (gnat_to_gnu_component_type): Try to make a packable type for fields of union types as well. (make_packable_type): Use RECORD_OR_UNION_TYPE_P predicate. (maybe_pad_type): Try to make a packable type for fields of union types as well. (gnat_to_gnu_field): Likewise. (is_variable_size): Use RECORD_OR_UNION_TYPE_P predicate. (set_rm_size): Likewise. (rm_size): Likewise. * gcc-interface/misc.c (gnat_type_max_size): Likewise. * gcc-interface/trans.c (add_decl_expr): Likewise. * gcc-interface/utils.c (finish_record_type): Likewise. * gcc-interface/utils2.c (build_simple_component_ref): Likewise. From-SVN: r180540
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index df10c91..1f43f4d 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -6754,10 +6754,8 @@ add_decl_expr (tree gnu_decl, Entity_Id gnat_entity)
}
/* In any case, we have to deal with our own TYPE_ADA_SIZE field. */
else if (TREE_CODE (gnu_decl) == TYPE_DECL
- && ((TREE_CODE (type) == RECORD_TYPE
- && !TYPE_FAT_POINTER_P (type))
- || TREE_CODE (type) == UNION_TYPE
- || TREE_CODE (type) == QUAL_UNION_TYPE))
+ && RECORD_OR_UNION_TYPE_P (type)
+ && !TYPE_FAT_POINTER_P (type))
MARK_VISITED (TYPE_ADA_SIZE (type));
}
else if (!DECL_EXTERNAL (gnu_decl))