summaryrefslogtreecommitdiff
path: root/gcc/ada/a-convec.adb
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-27 07:51:59 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-27 07:51:59 +0000
commitcb56012690ae1b8f203a61decdcb5d281db2431c (patch)
tree58bc341cb04d6000b923fc1d7edb78289d9f2938 /gcc/ada/a-convec.adb
parent84836637fcb8e7c3aea3b25f4cbf17a59cfca553 (diff)
downloadgcc-cb56012690ae1b8f203a61decdcb5d281db2431c.tar.gz
2009-07-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 150103 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@150104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-convec.adb')
-rw-r--r--gcc/ada/a-convec.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/a-convec.adb b/gcc/ada/a-convec.adb
index b876e8ee971..64b1b07d927 100644
--- a/gcc/ada/a-convec.adb
+++ b/gcc/ada/a-convec.adb
@@ -267,10 +267,15 @@ package body Ada.Containers.Vectors is
begin
Container.Elements := null;
- Container.Last := No_Index;
Container.Busy := 0;
Container.Lock := 0;
+ -- Note: it may seem that the following assignment to Container.Last
+ -- is useless, since we assign it to L below. However this code is
+ -- used in case 'new Elements_Type' below raises an exception, to
+ -- keep Container in a consistent state.
+
+ Container.Last := No_Index;
Container.Elements := new Elements_Type'(L, EA);
Container.Last := L;
end;