Fix for c330001 - PR ada/19386
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 10 Feb 2005 13:53:21 +0000 (14:53 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 10 Feb 2005 13:53:21 +0000 (14:53 +0100)
commit8afc118e11c9b2091f76c5e44fe7e6ad28820d7e
tree684c32a8daeae86786653d8ce917537a2c90db20
parentcc892b2c9128f71cf72f4fbad94d272d02562435
Fix for c330001 - PR ada/19386

2005-02-09  Eric Botcazou  <ebotcazou@adacore.com>
    Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

Fix for c330001 - PR ada/19386

* decl.c:
(gnat_to_gnu_field): Do not necessarily invoke make_packable_type
on the field if Pragma Component_Alignment (Storage_Unit).
(gnat_to_gnu_entity, case object): Do not treat a renaming that has
side-effects as if it were a constant; also make SAVE_EXPR to protect
side-effects.
(gnat_to_gnu_entity, case E_Record_Subtype): If have _Parent, make a
UNION_TYPE.
(make_dummy_type): Set TYPE_UNCHECKED_UNION_P.
(components_to_record): Test it.
Fix improper usage of REFERENCE_CLASS_P.

* utils2.c (build_binary_op, case MODIFY_EXPRP): Treat UNION_TYPE as
RECORD_TYPE.

* utils2.c: Minor reformatting.

* utils.c (convert, case UNION_TYPE): Check TYPE_UNCHECKED_UNION;
handle other cases like RECORD_TYPE.

* utils.c (gnat_pushdecl): Set TREE_NO_WARNING.

From-SVN: r94812
gcc/ada/decl.c
gcc/ada/utils.c
gcc/ada/utils2.c