sem_res.adb (Resolve_Call): if the call is actually an indexing operation on the...
authorEd Schonberg <schonber@gnat.com>
Fri, 26 Oct 2001 00:47:09 +0000 (00:47 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Fri, 26 Oct 2001 00:47:09 +0000 (02:47 +0200)
* sem_res.adb (Resolve_Call): if the call is actually an indexing
        operation on the result of a parameterless call, perform elaboration
        check after the node has been properly rewritten.

* sem_ch12.adb (Copy_Generic_Node): after the proper body has been
        inlined within the generic tree, the defining identifier is not a
        compilation_unit.

From-SVN: r46510

gcc/ada/ChangeLog
gcc/ada/sem_ch12.adb
gcc/ada/sem_res.adb

index b6d490904820382274b49d1d332e84d5a3ac8984..4e0ae19b12010b7cb4dc2c3d9723367c920d7b8c 100644 (file)
@@ -1,3 +1,13 @@
+2001-10-25  Ed Schonberg <schonber@gnat.com>
+
+       * sem_res.adb (Resolve_Call): if the call is actually an indexing 
+        operation on the result of a parameterless call, perform elaboration 
+        check after the node has been properly rewritten.
+       
+       * sem_ch12.adb (Copy_Generic_Node): after the proper body has been 
+        inlined within the generic tree, the defining identifier is not a 
+        compilation_unit.
+
 2001-10-25  Ed Schonberg <schonber@gnat.com>
 
        * sem_res.adb (Resolve): special-case resolution of Null in an 
index 8c868b26b3557b0e6ff8c62565a47a3a222734e6..4d372d68a758bce848aa486f24415f40cfd7e0ae 100644 (file)
@@ -4499,9 +4499,10 @@ package body Sem_Ch12 is
                     Empty, Instantiating => False);
 
                --  Now place the original proper body in the original
-               --  generic unit.
+               --  generic unit. This is a body, not a compilation unit.
 
                Rewrite (N, Proper_Body (Unit (Subunit)));
+               Set_Is_Compilation_Unit (Defining_Entity (N), False);
                Set_Was_Originally_Stub (N);
 
                --  Finally replace the body of the subunit with its copy,
index ef4ca9e346c25d7e4159fedf4af093b5d69a0315..bf1a7152ac1757d6bc40de5657966992d442cfbe 100644 (file)
@@ -3130,7 +3130,6 @@ package body Sem_Res is
             Index_Node : Node_Id;
 
          begin
-            Check_Elab_Call (N);
 
             if Component_Type (Etype (Nam)) /= Any_Type then
                Index_Node :=
@@ -3147,6 +3146,7 @@ package body Sem_Res is
                Set_Etype (Prefix (N), Etype (Nam));
                Set_Etype (N, Typ);
                Resolve_Indexed_Component (N, Typ);
+               Check_Elab_Call (Prefix (N));
             end if;
 
             return;