aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2005-02-10 14:56:10 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-02-10 14:56:10 +0100
commit340b490d0b329325c3513165adfea1048b9500a9 (patch)
treebef1428302b5ba2c11adad09aec802b4cb362b1e
parent7ffd93121c90bb8edabadc47a82e71087dea7eb1 (diff)
downloadgcc-340b490d0b329325c3513165adfea1048b9500a9.zip
gcc-340b490d0b329325c3513165adfea1048b9500a9.tar.gz
gcc-340b490d0b329325c3513165adfea1048b9500a9.tar.bz2
sem_ch7.adb (Uninstall_Declarations): Exchange full and private views of a private type after handling its private...
* sem_ch7.adb (Uninstall_Declarations): Exchange full and private views of a private type after handling its private dependents, to maintain proper stack discipline between entry and exit from the package. From-SVN: r94821
-rw-r--r--gcc/ada/sem_ch7.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb
index 5ffa863..b56917d 100644
--- a/gcc/ada/sem_ch7.adb
+++ b/gcc/ada/sem_ch7.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, 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- --
@@ -1905,7 +1905,6 @@ package body Sem_Ch7 is
end if;
Priv_Elmt := First_Elmt (Private_Dependents (Id));
- Exchange_Declarations (Id);
-- Swap out the subtypes and derived types of Id that were
-- compiled in this scope, or installed previously by
@@ -1937,6 +1936,10 @@ package body Sem_Ch7 is
Next_Elmt (Priv_Elmt);
end loop;
+ -- Now restore the type itself to its private view.
+
+ Exchange_Declarations (Id);
+
elsif Ekind (Id) = E_Incomplete_Type
and then No (Full_View (Id))
then