aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-27 17:43:29 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-27 17:43:29 +0100
commit00ba7be81367fd082166105ab3e8b8f43d04051c (patch)
tree4afa06847d2f11a96343bc725c5145358cacf44c /gcc/ada/exp_ch4.adb
parent8fdafe44be001fa59172d7a28626d4babdc24b7b (diff)
downloadgcc-00ba7be81367fd082166105ab3e8b8f43d04051c.zip
gcc-00ba7be81367fd082166105ab3e8b8f43d04051c.tar.gz
gcc-00ba7be81367fd082166105ab3e8b8f43d04051c.tar.bz2
[multiple changes]
2014-01-27 Robert Dewar <dewar@adacore.com> * exp_smem.adb: Minor reformatting. 2014-01-27 Thomas Quinot <quinot@adacore.com> * a-calfor.ads: Fix incorrect reference to operator "-" in comment. 2014-01-27 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate nodes for operands to the original node for the call, to preserve Original_Node pointers within the resolved operands, given that they may have been rewritten as well. Previous approach copied the operands into a new tree and lost those pointers. 2014-01-27 Claire Dross <dross@adacore.com> * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API. 2014-01-27 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Check_Internal_Protected_Use): A call through an anonymous access parameter of the current protected function is not a potential modification of the current object. 2014-01-27 Ed Schonberg <schonberg@adacore.com> * a-cobove.adb (Reserve_Capacity): Procedure raises Capacity_Error, not Constraint_Error, when request cannot be satisfied. 2014-01-27 Vincent Celier <celier@adacore.com> * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target, not the Target to itself. 2014-01-27 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_Concatenate): If the target of the concatenation is a library-level entity, always use the off-line version of concatenation, regardless of optimization level. This is space-efficient, and prevents linking problems when some units are compiled with different optimization levels. 2014-01-27 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb: Code clean up. 2014-01-27 Ed Schonberg <schonberg@adacore.com> * par-ch5.adb (P_Iterator_Specification): Improve error recovery when an array or container iterator includes a subtype indication, which is only legal in an element iterator. From-SVN: r207141
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 97368c0..d0288b2 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -3043,6 +3043,16 @@ package body Exp_Ch4 is
-- Local Declarations
+ Lib_Level_Target : constant Boolean :=
+ Nkind (Parent (Cnode)) = N_Object_Declaration
+ and then
+ Is_Library_Level_Entity (Defining_Identifier (Parent (Cnode)));
+
+ -- If the concatenation declares a library level entity, we call the
+ -- built-in concatenation routines to prevent code bloat, regardless
+ -- of optimization level. This is space-efficient, and prevent linking
+ -- problems when units are compiled with different optimizations.
+
Opnd_Typ : Entity_Id;
Ent : Entity_Id;
Len : Uint;
@@ -3571,8 +3581,10 @@ package body Exp_Ch4 is
if Atyp = Standard_String
and then NN in 2 .. 9
- and then (Opt.Optimization_Level = 0 or else Debug_Flag_Dot_CC)
- and then not Debug_Flag_Dot_C
+ and then (Lib_Level_Target
+ or else
+ ((Opt.Optimization_Level = 0 or else Debug_Flag_Dot_CC)
+ and then not Debug_Flag_Dot_C))
then
declare
RR : constant array (Nat range 2 .. 9) of RE_Id :=