===================================================================
@@ -115,7 +115,7 @@
-- d.v
-- d.w Do not check for infinite loops
-- d.x No exception handlers
- -- d.y
+ -- d.y Disable implicit pragma Elaborate_All on task bodies
-- d.z Restore previous support for frontend handling of Inline_Always
-- d.A Read/write Aspect_Specifications hash table to tree
@@ -603,6 +603,12 @@
-- fully compiled and analyzed, they just get eliminated from the
-- code generation step.
+ -- d.y Disable implicit pragma Elaborate_All on task bodies. When a task
+ -- body calls a procedure in the same package, and that procedure
+ -- calls a procedure in another package, the static elaboration
+ -- machinery adds an implicit Elaborate_All on the other package. This
+ -- switch disables the addition of the implicit pragma in such cases.
+ --
-- d.z Restore previous front-end support for Inline_Always. In default
-- mode, for targets that use the GCC back end, Inline_Always is
-- handled by the back end. Use of this switch restores the previous
===================================================================
@@ -2961,19 +2961,21 @@
Next_Elmt (Elmt);
end loop;
- -- For tasks declared in the current unit, trace other calls within
- -- the task procedure bodies, which are available.
+ -- For tasks declared in the current unit, trace other calls within the
+ -- task procedure bodies, which are available.
- In_Task_Activation := True;
+ if not Debug_Flag_Dot_Y then
+ In_Task_Activation := True;
- Elmt := First_Elmt (Intra_Procs);
- while Present (Elmt) loop
- Ent := Node (Elmt);
- Check_Internal_Call_Continue (N, Ent, Enclosing, Ent);
- Next_Elmt (Elmt);
- end loop;
+ Elmt := First_Elmt (Intra_Procs);
+ while Present (Elmt) loop
+ Ent := Node (Elmt);
+ Check_Internal_Call_Continue (N, Ent, Enclosing, Ent);
+ Next_Elmt (Elmt);
+ end loop;
- In_Task_Activation := False;
+ In_Task_Activation := False;
+ end if;
end Check_Task_Activation;
-------------------------------
===================================================================
@@ -71,7 +71,7 @@
-- output a warning.
-- For calls to a subprogram in a with'ed unit or a 'Access or variable
- -- refernece (SPARK mode case), we require that a pragma Elaborate_All
+ -- reference (SPARK mode case), we require that a pragma Elaborate_All
-- or pragma Elaborate be present, or that the referenced unit have a
-- pragma Preelaborate, pragma Pure, or pragma Elaborate_Body. If none
-- of these conditions is met, then a warning is generated that a pragma