summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/a-coinho-shared.adb14
-rw-r--r--gcc/ada/a-coinho-shared.ads2
-rw-r--r--gcc/ada/a-coinho.adb4
-rw-r--r--gcc/ada/a-coinho.ads2
5 files changed, 13 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2ff72261881..0134a76a111 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-16 Vadim Godunko <godunko@adacore.com>
+
+ * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
+ Fix parameter mode of Update_Element.
+
2014-07-16 Robert Dewar <dewar@adacore.com>
* a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb
index df2d55ad574..defdf3ad17f 100644
--- a/gcc/ada/a-coinho-shared.adb
+++ b/gcc/ada/a-coinho-shared.adb
@@ -67,12 +67,7 @@ package body Ada.Containers.Indefinite_Holders is
begin
if Control.Container /= null then
Reference (Control.Container.Reference);
-
- declare
- B : Natural renames Control.Container.Busy;
- begin
- B := B + 1;
- end;
+ Control.Container.Busy := Control.Container.Busy + 1;
end if;
end Adjust;
@@ -179,9 +174,8 @@ package body Ada.Containers.Indefinite_Holders is
if Control.Container /= null then
Unreference (Control.Container.Reference);
Control.Container.Busy := Control.Container.Busy - 1;
+ Control.Container := null;
end if;
-
- Control.Container := null;
end Finalize;
--------------
@@ -385,10 +379,10 @@ package body Ada.Containers.Indefinite_Holders is
--------------------
procedure Update_Element
- (Container : Holder;
+ (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type))
is
- B : Natural renames Container'Unrestricted_Access.Busy;
+ B : Natural renames Container.Busy;
begin
if Container.Reference = null then
diff --git a/gcc/ada/a-coinho-shared.ads b/gcc/ada/a-coinho-shared.ads
index 3e1ed18a4b0..df364b3426e 100644
--- a/gcc/ada/a-coinho-shared.ads
+++ b/gcc/ada/a-coinho-shared.ads
@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is
(Container : Holder;
Process : not null access procedure (Element : Element_Type));
procedure Update_Element
- (Container : Holder;
+ (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type));
type Constant_Reference_Type
diff --git a/gcc/ada/a-coinho.adb b/gcc/ada/a-coinho.adb
index 9fe4c143e4d..2cdba9957c1 100644
--- a/gcc/ada/a-coinho.adb
+++ b/gcc/ada/a-coinho.adb
@@ -325,10 +325,10 @@ package body Ada.Containers.Indefinite_Holders is
--------------------
procedure Update_Element
- (Container : Holder;
+ (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type))
is
- B : Natural renames Container'Unrestricted_Access.Busy;
+ B : Natural renames Container.Busy;
begin
if Container.Element = null then
diff --git a/gcc/ada/a-coinho.ads b/gcc/ada/a-coinho.ads
index c5f45f54636..2f81d750fce 100644
--- a/gcc/ada/a-coinho.ads
+++ b/gcc/ada/a-coinho.ads
@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is
Process : not null access procedure (Element : Element_Type));
procedure Update_Element
- (Container : Holder;
+ (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type));
type Constant_Reference_Type