sem_elab.adb (Check_Elab_Call): Do not check a call that does not appear in the code for the main unit.

2004-10-26  Ed Schonberg  <schonberg@gnat.com>

	* sem_elab.adb (Check_Elab_Call): Do not check a call that does not
	appear in the code for the main unit. Dependencies among units in the
	context of the main unit are established when those other units are
	compiled. Otherwise spurious elaboration constraints can generate
	incorrect elaboration circularities.

From-SVN: r89673
This commit is contained in:
Ed Schonberg 2004-10-27 15:54:38 +02:00 committed by Arnaud Charlet
parent e895b4353e
commit 65b03d7d59

View File

@ -913,6 +913,14 @@ package body Sem_Elab is
-- Start of processing for Check_Elab_Call
begin
-- If the call does not come from the main unit, there is nothing to
-- check. Elaboration call from units in the context of the main unit
-- will lead to semantic dependencies when those units are compiled.
if not In_Extended_Main_Code_Unit (N) then
return;
end if;
-- For an entry call, check relevant restriction
if Nkind (N) = N_Entry_Call_Statement