aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/frontend.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-05-12 10:36:45 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-05-12 10:36:45 +0200
commitf8dae9bb29d4dffc332c5a0670ff814816c87731 (patch)
tree57218611df0267da5328f2edf73b0d2ae8c2c482 /gcc/ada/frontend.adb
parent73cc8f6230c672fab16f0d43a661c62744b5f0cb (diff)
downloadgcc-f8dae9bb29d4dffc332c5a0670ff814816c87731.zip
gcc-f8dae9bb29d4dffc332c5a0670ff814816c87731.tar.gz
gcc-f8dae9bb29d4dffc332c5a0670ff814816c87731.tar.bz2
[multiple changes]
2015-05-12 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting. 2015-05-12 Vincent Celier <celier@adacore.com> * gnatcmd.adb: If we want to invoke gnatmake (gnatclean) with -P, then check if gprbuild (gprclean) is available; if it is, use gprbuild (gprclean) instead of gnatmake (gnatclean). 2015-05-12 Robert Dewar <dewar@adacore.com> * debug.adb: Add flag -gnatd.3 to output diagnostic info from Exp_Unst. * einfo.ad, einfo.adb: Reorganize (and remove most of) flags used by Exp_Unst. * exp_ch6.adb (Unest_Bodies): Table for delayed calls to Unnest_Subprogram (Expand_N_Subprogram_Body): Add entry to table for later call instead of calling Unnest_Subprogram directly (Initialize): New procedure (Unnest_Subprograms): New procedure * exp_ch6.ads (Add_Extra_Actual_To_Call): Move into proper alpha order. (Initialize): New procedure. (Unnest_Subprograms): New procedure. * exp_unst.adb (Unnest_Subprogram): Major rewrite, moving all processing to this routine which is now called late after instantiating bodies. Fully handles the case of generic instantiations now. * exp_unst.ads: Major rewrite, moving all processing to Unnest_Subprogram. * frontend.adb (Frontend): Add call to Exp_Ch6.Initialize. (Frontend): Add call to Unnest_Subprograms. * sem_ch8.adb (Find_Direct_Name): Back to old calling sequence for Check_Nested_Access. * sem_util.adb (Build_Default_Subtype): Minor reformatting (Check_Nested_Access): Back to original VM-only form (we now do all the processing for Unnest_Subprogram at the time it is called. (Denotes_Same_Object): Minor reformatting (Note_Possible_Modification): Old calling sequence for Check_Nested_Access. * sem_util.ads (Check_Nested_Access): Back to original VM-only form (we now do all the processing for Unnest_Subprogram at the time it is called. From-SVN: r223043
Diffstat (limited to 'gcc/ada/frontend.adb')
-rw-r--r--gcc/ada/frontend.adb13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index bab0b46..ba90379 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -30,6 +30,7 @@ with Checks;
with CStand;
with Debug; use Debug;
with Elists;
+with Exp_Ch6;
with Exp_Dbug;
with Fmap;
with Fname.UF;
@@ -90,6 +91,7 @@ begin
Checks.Initialize;
Sem_Warn.Initialize;
Prep.Initialize;
+ Exp_Ch6.Initialize;
if Generate_SCIL then
SCIL_LL.Initialize;
@@ -408,13 +410,6 @@ begin
-- Cleanup processing after completing main analysis
- -- Turn off unnesting of subprograms mode. This is not right
- -- with respect to instantiations. What needs to happen is that
- -- we do the unnesting AFTER the call to Instantiate_Bodies. We
- -- will take care of that later ???
-
- Opt.Unnest_Subprogram_Mode := False;
-
-- Comment needed for ASIS mode test and GNATprove mode test???
if Operating_Mode = Generate_Code
@@ -444,6 +439,10 @@ begin
Remove_Ignored_Ghost_Code;
end if;
+ -- At this stage we can unnest subprogram bodies if required
+
+ Exp_Ch6.Unnest_Subprograms;
+
-- List library units if requested
if List_Units then