aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bindgen.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-18 11:05:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-18 11:05:04 +0200
commitb3b26ace90c59e56d59edeffd8ea7f73b07097af (patch)
tree0cf2f23c15136334abbb91e7669863ba1839f2cc /gcc/ada/bindgen.adb
parent537b531270c1c41918d3781c151fe38bb8c63c50 (diff)
downloadgcc-b3b26ace90c59e56d59edeffd8ea7f73b07097af.zip
gcc-b3b26ace90c59e56d59edeffd8ea7f73b07097af.tar.gz
gcc-b3b26ace90c59e56d59edeffd8ea7f73b07097af.tar.bz2
[multiple changes]
2014-07-18 Robert Dewar <dewar@adacore.com> * bcheck.adb (Check_Consistent_Restrictions): Remove obsolete code checking for violation of No_Standard_Allocators_After_Elaboration (main program) * bindgen.adb (Gen_Adainit): Handle No_Standard_Allocators_After_Elaboration (Gen_Output_File_Ada): ditto. * exp_ch4.adb (Expand_N_Allocator): Handle No_Standard_Allocators_After_Elaboration. * Makefile.rtl: Add entry for s-elaall * rtsfind.ads: Add entry for Check_Standard_Allocator. * s-elaall.ads, s-elaall.adb: New files. * sem_ch4.adb (Analyze_Allocator): Handle No_Standard_Allocators_After_Elaboration. 2014-07-18 Robert Dewar <dewar@adacore.com> * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb, ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses. Remove AB parameter from ali files and all uses. Remove Allocator_In_Body and all uses. 2014-07-18 Robert Dewar <dewar@adacore.com> * g-expect-vms.adb: Add comment. 2014-07-18 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Is_Logical_Operation): return True for N_If_Expression. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Resolve_Attribute, case 'Update): Do full analysis and resolution of each choice in the associations within the argument of Update, because they may be variable names. 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition actions before the generated if statement. 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com> * gnat_ugn.texi Enhance the documentation of switches -gnateA and -gnateV. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Build_Default_Subtype): Add missing condition so that code matches description: use the full view of the base only if the base is private and the subtype is not. From-SVN: r212779
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r--gcc/ada/bindgen.adb38
1 files changed, 36 insertions, 2 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index a192953..f045b8e 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -739,8 +739,8 @@ package body Bindgen is
if Dispatching_Domains_Used then
WBI (" procedure Freeze_Dispatching_Domains;");
WBI (" pragma Import");
- WBI (" (Ada, Freeze_Dispatching_Domains, " &
- """__gnat_freeze_dispatching_domains"");");
+ WBI (" (Ada, Freeze_Dispatching_Domains, "
+ & """__gnat_freeze_dispatching_domains"");");
end if;
WBI (" begin");
@@ -749,6 +749,18 @@ package body Bindgen is
WBI (" end if;");
WBI (" Is_Elaborated := True;");
+ -- Call System.Elaboration_Allocators.Mark_Start_Of_Elaboration if
+ -- restriction No_Standard_Allocators_After_Elaboration is active.
+
+ if Cumulative_Restrictions.Set
+ (No_Standard_Allocators_After_Elaboration)
+ then
+ WBI (" System.Elaboration_Allocators."
+ & "Mark_Start_Of_Elaboration;");
+ end if;
+
+ -- Generate assignments to initialize globals
+
Set_String (" Main_Priority := ");
Set_Int (Main_Priority);
Set_Char (';');
@@ -996,6 +1008,15 @@ package body Bindgen is
Gen_Elab_Calls;
+ -- Call System.Elaboration_Allocators.Mark_Start_Of_Elaboration if
+ -- restriction No_Standard_Allocators_After_Elaboration is active.
+
+ if Cumulative_Restrictions.Set
+ (No_Standard_Allocators_After_Elaboration)
+ then
+ WBI (" System.Elaboration_Allocators.Mark_End_Of_Elaboration;");
+ end if;
+
-- From this point, no new dispatching domain can be created.
if Dispatching_Domains_Used then
@@ -2482,10 +2503,23 @@ package body Bindgen is
WBI ("with System.Restrictions;");
end if;
+ -- Generate with of Ada.Exceptions if needs library finalization
+
if Needs_Library_Finalization then
WBI ("with Ada.Exceptions;");
end if;
+ -- Generate with of System.Elaboration_Allocators if the restriction
+ -- No_Standard_Allocators_After_Elaboration was present.
+
+ if Cumulative_Restrictions.Set
+ (No_Standard_Allocators_After_Elaboration)
+ then
+ WBI ("with System.Elaboration_Allocators;");
+ end if;
+
+ -- Generate start of package body
+
WBI ("");
WBI ("package body " & Ada_Main & " is");
WBI (" pragma Warnings (Off);");