This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix problem with stack checking and dynamic elaboration checks
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Ada] Fix problem with stack checking and dynamic elaboration checks
- From: bosch at gnat dot com
- Date: Thu, 25 Oct 2001 20:46:53 -0400 (EDT)
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.
*** sem_res.adb 2001/09/25 19:00:16 1.718
--- sem_res.adb 2001/09/27 01:05:43 1.719
***************
*** 3126,3132 ****
Index_Node : Node_Id;
begin
- Check_Elab_Call (N);
if Component_Type (Etype (Nam)) /= Any_Type then
Index_Node :=
--- 3126,3131 ----
***************
*** 3143,3148 ****
--- 3142,3148 ----
Set_Etype (Prefix (N), Etype (Nam));
Set_Etype (N, Typ);
Resolve_Indexed_Component (N, Typ);
+ Check_Elab_Call (Prefix (N));
end if;
return;
*** sem_ch12.adb 2001/09/26 12:13:53 1.778
--- sem_ch12.adb 2001/09/27 01:05:46 1.779
***************
*** 4499,4507 ****
Empty, Instantiating => False);
-- Now place the original proper body in the original
! -- generic unit.
Rewrite (N, Proper_Body (Unit (Subunit)));
Set_Was_Originally_Stub (N);
-- Finally replace the body of the subunit with its copy,
--- 4499,4508 ----
Empty, Instantiating => False);
-- Now place the original proper body in the original
! -- 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,