aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-06-19 12:49:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-06-19 12:49:31 +0200
commitc3b74b8ac872668b2a5f5804b48e4b27949de70f (patch)
treeba5e78e8fb0f88675ef26429e120642e53deb6f8 /gcc
parentf26d5cd3cb349d6a5bb39a74ae28d47bd378c937 (diff)
downloadgcc-c3b74b8ac872668b2a5f5804b48e4b27949de70f.zip
gcc-c3b74b8ac872668b2a5f5804b48e4b27949de70f.tar.gz
gcc-c3b74b8ac872668b2a5f5804b48e4b27949de70f.tar.bz2
sem.adb (Walk_Library_Items): Include bodies in the list of units to traverse...
* sem.adb (Walk_Library_Items): Include bodies in the list of units to traverse, to account for front-end inlining and instantiations in a spec or in the main unit. From-SVN: r148695
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem.adb38
1 files changed, 21 insertions, 17 deletions
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index d2b54c3..94cfbdc 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -1514,9 +1514,9 @@ package body Sem is
-- Calls Action, with some validity checks
procedure Do_Unit_And_Dependents (CU : Node_Id; Item : Node_Id);
- -- Calls Do_Action, first on the units with'ed by this one, then on this
- -- unit. If it's an instance body, do the spec first. If it's an
- -- instance spec, do the body last.
+ -- Calls Do_Action, first on the units with'ed by this one, then on
+ -- this unit. If it's an instance body, do the spec first. If it is
+ -- an instance spec, do the body last.
---------------
-- Do_Action --
@@ -1530,21 +1530,25 @@ package body Sem is
pragma Assert (No (CU) or else Nkind (CU) = N_Compilation_Unit);
case Nkind (Item) is
- when N_Generic_Subprogram_Declaration |
- N_Generic_Package_Declaration |
- N_Package_Declaration |
- N_Subprogram_Declaration |
- N_Subprogram_Renaming_Declaration |
- N_Package_Renaming_Declaration |
- N_Generic_Function_Renaming_Declaration |
- N_Generic_Package_Renaming_Declaration |
- N_Generic_Procedure_Renaming_Declaration =>
- null; -- Specs are OK
+ when N_Generic_Subprogram_Declaration |
+ N_Generic_Package_Declaration |
+ N_Package_Declaration |
+ N_Subprogram_Declaration |
+ N_Subprogram_Renaming_Declaration |
+ N_Package_Renaming_Declaration |
+ N_Generic_Function_Renaming_Declaration |
+ N_Generic_Package_Renaming_Declaration |
+ N_Generic_Procedure_Renaming_Declaration =>
+
+ -- Specs are OK
+
+ null;
+
+ when N_Package_Body =>
-- Package bodies are processed immediately after the
-- corresponding spec.
- when N_Package_Body =>
null;
when N_Subprogram_Body =>
@@ -1557,9 +1561,9 @@ package body Sem is
-- All other cases cannot happen
- when N_Function_Instantiation |
- N_Procedure_Instantiation |
- N_Package_Instantiation =>
+ when N_Function_Instantiation |
+ N_Procedure_Instantiation |
+ N_Package_Instantiation =>
pragma Assert (False, "instantiation");
null;