aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-coinho-shared.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-16 15:53:37 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-16 15:53:37 +0200
commitab4766388256f3a8b070872bd0af94056afb5417 (patch)
tree4411672446c3d5a0beded559300f272f3861e178 /gcc/ada/a-coinho-shared.adb
parent3a859cff11c42d863dc37bca68290a308ccfa60c (diff)
downloadgcc-ab4766388256f3a8b070872bd0af94056afb5417.zip
gcc-ab4766388256f3a8b070872bd0af94056afb5417.tar.gz
gcc-ab4766388256f3a8b070872bd0af94056afb5417.tar.bz2
[multiple changes]
2014-07-16 Robert Dewar <dewar@adacore.com> * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting. 2014-07-16 Ed Schonberg <schonberg@adacore.com> * a-cohase.ads: Type Iterator must be controlled, so that the tampering bit is properly set through an iteration. * a-cohase.adb: Add Finalize operation for type Iterator. From-SVN: r212643
Diffstat (limited to 'gcc/ada/a-coinho-shared.adb')
-rw-r--r--gcc/ada/a-coinho-shared.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb
index c9f117e..df2d55a 100644
--- a/gcc/ada/a-coinho-shared.adb
+++ b/gcc/ada/a-coinho-shared.adb
@@ -38,12 +38,13 @@ package body Ada.Containers.Indefinite_Holders is
function "=" (Left, Right : Holder) return Boolean is
begin
- if Left.Reference = null and Right.Reference = null then
+ if Left.Reference = Right.Reference then
+ -- Covers both null and not null but the same shared object cases.
+
return True;
elsif Left.Reference /= null and Right.Reference /= null then
return Left.Reference.Element.all = Right.Reference.Element.all;
-
else
return False;
end if;
@@ -66,6 +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
@@ -122,10 +124,9 @@ package body Ada.Containers.Indefinite_Holders is
(Element => Container.Reference.Element.all'Access,
Control => (Controlled with Container'Unrestricted_Access));
B : Natural renames Ref.Control.Container.Busy;
-
begin
Reference (Ref.Control.Container.Reference);
- B := B + 1;
+ B := B + 1;
return Ref;
end Constant_Reference;