Commit 692317f4 by Eric Botcazou Committed by Eric Botcazou

trans.c (process_freeze_entity): Be prepared for a package without body.

	* gcc-interface/trans.c (process_freeze_entity): Be prepared for a
	package without body.

From-SVN: r255601
parent a3fc8f16
2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (process_freeze_entity): Be prepared for a
package without body.
2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
descendant of System.Address.
(gnat_to_gnu_subprog_type): Likewise.
......
......@@ -8718,12 +8718,12 @@ process_freeze_entity (Node_Id gnat_node)
const Entity_Kind kind = Ekind (gnat_entity);
tree gnu_old, gnu_new;
/* If this is a package, we need to generate code for the package. */
/* If this is a package, generate code for the package body, if any. */
if (kind == E_Package)
{
insert_code_for
(Parent (Corresponding_Body
(Parent (Declaration_Node (gnat_entity)))));
const Node_Id gnat_decl = Parent (Declaration_Node (gnat_entity));
if (Present (Corresponding_Body (gnat_decl)))
insert_code_for (Parent (Corresponding_Body (gnat_decl)));
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment