From 73b4a60f5cac0df12dd2346cf3963d9700e8e205 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 27 May 2015 19:57:43 +0000 Subject: [PATCH] trans.c (elaborate_all_entities): Do not elaborate an incomplete type coming from a limited_with and whose... * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an incomplete type coming from a limited_with and whose non-limited view comes from the main unit. From-SVN: r223772 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gcc-interface/trans.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 98d5ea95869..073172eac97 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2015-05-27 Eric Botcazou + + * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate an + incomplete type coming from a limited_with and whose non-limited view + comes from the main unit. + 2015-05-27 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Move down diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 7fc8a5c7d8f..c3b06c2c4fe 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -8158,6 +8158,10 @@ elaborate_all_entities (Node_Id gnat_node) && Ekind (gnat_entity) != E_Operator && !(IN (Ekind (gnat_entity), Type_Kind) && !Is_Frozen (gnat_entity)) + && !(IN (Ekind (gnat_entity), Incomplete_Kind) + && From_Limited_With (gnat_entity) + && In_Extended_Main_Code_Unit + (Non_Limited_View (gnat_entity))) && !((Ekind (gnat_entity) == E_Procedure || Ekind (gnat_entity) == E_Function) && Is_Intrinsic_Subprogram (gnat_entity)) -- 2.30.2