summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-18 09:05:04 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-18 09:05:04 +0000
commitaddd4a7e253c7ba64ed5f85d6fff29bdea1e10cc (patch)
tree0cf2f23c15136334abbb91e7669863ba1839f2cc /gcc/ada/exp_ch4.adb
parent5c3b4f09104a503edeb09d3027697049dbc4b185 (diff)
downloadgcc-addd4a7e253c7ba64ed5f85d6fff29bdea1e10cc.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 3aec3b15e0e..917f98a0e73 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -4490,6 +4490,20 @@ package body Exp_Ch4 is
end if;
end if;
+ -- If no storage pool has been specified and we have the restriction
+ -- No_Standard_Allocators_After_Elaboration is present, then generate
+ -- a call to Elaboration_Allocators.Check_Standard_Allocator.
+
+ if Nkind (N) = N_Allocator
+ and then No (Storage_Pool (N))
+ and then Restriction_Active (No_Standard_Allocators_After_Elaboration)
+ then
+ Insert_Action (N,
+ Make_Procedure_Call_Statement (Loc,
+ Name =>
+ New_Occurrence_Of (RTE (RE_Check_Standard_Allocator), Loc)));
+ end if;
+
-- Handle case of qualified expression (other than optimization above)
-- First apply constraint checks, because the bounds or discriminants
-- in the aggregate might not match the subtype mark in the allocator.