diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 13:47:11 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 13:47:11 +0000 |
commit | 6f3db96016b31453819415622e0f59ea20455377 (patch) | |
tree | c01f4f9157f276fa89e016d54921d2aad79f8c47 /gcc/ada/sem.adb | |
parent | 67e60322fa4f19ebac04cf78bba628edb1d9c119 (diff) | |
download | gcc-6f3db96016b31453819415622e0f59ea20455377.tar.gz |
2009-07-27 Robert Dewar <dewar@adacore.com>
* gnatfind.adb, osint.ads, sem.adb, xr_tabls.adb: Minor reformatting
and code clean up.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150117 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem.adb')
-rw-r--r-- | gcc/ada/sem.adb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index 7411edeaa7f..b8ad571487e 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -1873,13 +1873,12 @@ package body Sem is Main_CU : constant Node_Id := Cunit (Main_Unit); begin - - -- If the main unit is an instantiation, the body appears - -- before the instance spec, which is added later to the - -- unit list. Do the spec if present, body will follow. + -- If the main unit is an instantiation, the body appears before + -- the instance spec, which is added later to the unit list. Do + -- the spec if present, body will follow. if Nkind (Original_Node (Unit (Main_CU))) - in N_Generic_Instantiation + in N_Generic_Instantiation and then Present (Library_Unit (Main_CU)) then Do_Unit_And_Dependents @@ -1965,9 +1964,11 @@ package body Sem is end loop; -- See if it belongs to current unit, and if so, include its - -- with_clauses. + -- with_clauses. Do not process main unit prematurely. - if Pnode = CU then + if Pnode = CU + and then (CU /= Cunit (Main_Unit)) + then Walk_Immediate (Cunit (S), Include_Limited); end if; end; |