summaryrefslogtreecommitdiff
path: root/gcc/ada/s-pooloc.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 08:32:54 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 08:32:54 +0000
commit728d945b778441389b88d643cf12e79e32b226cc (patch)
treed2fd4933a5b73c49efa9dedef13cbafd8ba8e63b /gcc/ada/s-pooloc.adb
parent1aeb2140b4dd729719fc8c7f8d5183a177f93c12 (diff)
downloadgcc-728d945b778441389b88d643cf12e79e32b226cc.tar.gz
2011-08-04 Thomas Quinot <quinot@adacore.com>
PR ada/47880 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only allocated object. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-pooloc.adb')
-rw-r--r--gcc/ada/s-pooloc.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/s-pooloc.adb b/gcc/ada/s-pooloc.adb
index 37370e50284..2a161f49de3 100644
--- a/gcc/ada/s-pooloc.adb
+++ b/gcc/ada/s-pooloc.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
@@ -111,7 +111,10 @@ package body System.Pool_Local is
begin
if Prev (Allocated).all = Null_Address then
Pool.First := Next (Allocated).all;
- Prev (Pool.First).all := Null_Address;
+
+ if Pool.First /= Null_Address then
+ Prev (Pool.First).all := Null_Address;
+ end if;
else
Next (Prev (Allocated).all).all := Next (Allocated).all;
end if;