Commit 6f311316 by Ed Schonberg Committed by Geert Bosch

sem_res.adb (Resolve_Call): if the call is actually an indexing operation on the…

sem_res.adb (Resolve_Call): if the call is actually an indexing operation on the result of a parameterless...

	* 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
parent 17be0cdf
2001-10-25 Ed Schonberg <schonber@gnat.com> 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 * sem_res.adb (Resolve): special-case resolution of Null in an
instance or an inlined body to avoid view conflicts. instance or an inlined body to avoid view conflicts.
......
...@@ -4499,9 +4499,10 @@ package body Sem_Ch12 is ...@@ -4499,9 +4499,10 @@ package body Sem_Ch12 is
Empty, Instantiating => False); Empty, Instantiating => False);
-- Now place the original proper body in the original -- 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))); Rewrite (N, Proper_Body (Unit (Subunit)));
Set_Is_Compilation_Unit (Defining_Entity (N), False);
Set_Was_Originally_Stub (N); Set_Was_Originally_Stub (N);
-- Finally replace the body of the subunit with its copy, -- Finally replace the body of the subunit with its copy,
......
...@@ -3130,7 +3130,6 @@ package body Sem_Res is ...@@ -3130,7 +3130,6 @@ package body Sem_Res is
Index_Node : Node_Id; Index_Node : Node_Id;
begin begin
Check_Elab_Call (N);
if Component_Type (Etype (Nam)) /= Any_Type then if Component_Type (Etype (Nam)) /= Any_Type then
Index_Node := Index_Node :=
...@@ -3147,6 +3146,7 @@ package body Sem_Res is ...@@ -3147,6 +3146,7 @@ package body Sem_Res is
Set_Etype (Prefix (N), Etype (Nam)); Set_Etype (Prefix (N), Etype (Nam));
Set_Etype (N, Typ); Set_Etype (N, Typ);
Resolve_Indexed_Component (N, Typ); Resolve_Indexed_Component (N, Typ);
Check_Elab_Call (Prefix (N));
end if; end if;
return; 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