diff options
author | Ed Schonberg <schonber@gnat.com> | 2004-10-27 15:54:38 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-10-27 15:54:38 +0200 |
commit | 65b03d7d594f24807a36b96e1c52c061817cc307 (patch) | |
tree | 1afa7631a5c082a786b8b415df0c1075abfe9ad7 /gcc | |
parent | e895b4353e55d9c4bacb17be111deda3329ec095 (diff) | |
download | gcc-65b03d7d594f24807a36b96e1c52c061817cc307.zip gcc-65b03d7d594f24807a36b96e1c52c061817cc307.tar.gz gcc-65b03d7d594f24807a36b96e1c52c061817cc307.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_elab.adb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index 4248544..5c8b3e6 100644 --- a/gcc/ada/sem_elab.adb +++ b/gcc/ada/sem_elab.adb @@ -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 |