trans.c (elaborate_all_entities): Do not elaborate an incomplete type coming from...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 27 May 2015 19:57:43 +0000 (19:57 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 27 May 2015 19:57:43 +0000 (19:57 +0000)
* 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
gcc/ada/gcc-interface/trans.c

index 98d5ea9586980d668d0757b30e5b3e038e0fdce5..073172eac972e19829c60ccd554617a82aea24cd 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-27  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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  <ebotcazou@adacore.com>
 
        * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Move down
index 7fc8a5c7d8f360e943d48f36f5ea68814f26394c..c3b06c2c4feaf53c4cb5556f7dc3987e4d6274fa 100644 (file)
@@ -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))