aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVadim Godunko <godunko@adacore.com>2014-11-20 14:32:50 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-11-20 15:32:50 +0100
commitf92d99c60b5001d88f09742eec97b4ddbeefb978 (patch)
tree3d970030322587c214b8dd73dabe30459415a929 /gcc
parente61fc983890efb7dee953334a7eef5d7b0626a06 (diff)
downloadgcc-f92d99c60b5001d88f09742eec97b4ddbeefb978.zip
gcc-f92d99c60b5001d88f09742eec97b4ddbeefb978.tar.gz
gcc-f92d99c60b5001d88f09742eec97b4ddbeefb978.tar.bz2
2014-11-20 Vadim Godunko <godunko@adacore.com>
* a-strunb-shared.adb, a-stwiun-shared.adb, a-stzunb-shared.adb ("&") Use already computed value of data length to call allocation subprogram. From-SVN: r217860
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/a-strunb-shared.adb2
-rw-r--r--gcc/ada/a-stwiun-shared.adb4
-rw-r--r--gcc/ada/a-stzunb-shared.adb12
4 files changed, 15 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d25786b..d5473a1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-20 Vadim Godunko <godunko@adacore.com>
+
+ * a-strunb-shared.adb, a-stwiun-shared.adb, a-stzunb-shared.adb
+ ("&") Use already computed value of data length to call allocation
+ subprogram.
+
2014-11-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Call, Inlined_Subprogram): Do not suppress
diff --git a/gcc/ada/a-strunb-shared.adb b/gcc/ada/a-strunb-shared.adb
index caeb3a0..9c92466 100644
--- a/gcc/ada/a-strunb-shared.adb
+++ b/gcc/ada/a-strunb-shared.adb
@@ -91,7 +91,7 @@ package body Ada.Strings.Unbounded is
-- Otherwise, allocate new shared string and fill data
else
- DR := Allocate (LR.Last + RR.Last);
+ DR := Allocate (DL);
DR.Data (1 .. LR.Last) := LR.Data (1 .. LR.Last);
DR.Data (LR.Last + 1 .. DL) := RR.Data (1 .. RR.Last);
DR.Last := DL;
diff --git a/gcc/ada/a-stwiun-shared.adb b/gcc/ada/a-stwiun-shared.adb
index 6c3be54..284ffd3 100644
--- a/gcc/ada/a-stwiun-shared.adb
+++ b/gcc/ada/a-stwiun-shared.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -91,7 +91,7 @@ package body Ada.Strings.Wide_Unbounded is
-- Overwise, allocate new shared string and fill data
else
- DR := Allocate (LR.Last + RR.Last);
+ DR := Allocate (DL);
DR.Data (1 .. LR.Last) := LR.Data (1 .. LR.Last);
DR.Data (LR.Last + 1 .. DL) := RR.Data (1 .. RR.Last);
DR.Last := DL;
diff --git a/gcc/ada/a-stzunb-shared.adb b/gcc/ada/a-stzunb-shared.adb
index 37ab295..b71f71d 100644
--- a/gcc/ada/a-stzunb-shared.adb
+++ b/gcc/ada/a-stzunb-shared.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -91,7 +91,7 @@ package body Ada.Strings.Wide_Wide_Unbounded is
-- Overwise, allocate new shared string and fill data
else
- DR := Allocate (LR.Last + RR.Last);
+ DR := Allocate (DL);
DR.Data (1 .. LR.Last) := LR.Data (1 .. LR.Last);
DR.Data (LR.Last + 1 .. DL) := RR.Data (1 .. RR.Last);
DR.Last := DL;
@@ -1614,9 +1614,9 @@ package body Ada.Strings.Wide_Wide_Unbounded is
end if;
end Tail;
- --------------------
+ -------------------------
-- To_Wide_Wide_String --
- --------------------
+ -------------------------
function To_Wide_Wide_String
(Source : Unbounded_Wide_Wide_String) return Wide_Wide_String is
@@ -1624,9 +1624,9 @@ package body Ada.Strings.Wide_Wide_Unbounded is
return Source.Reference.Data (1 .. Source.Reference.Last);
end To_Wide_Wide_String;
- ------------------------------
+ -----------------------------------
-- To_Unbounded_Wide_Wide_String --
- ------------------------------
+ -----------------------------------
function To_Unbounded_Wide_Wide_String
(Source : Wide_Wide_String) return Unbounded_Wide_Wide_String