aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 16:52:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 16:52:04 +0200
commit243cae0a5108e18638c9c4844baaf392171130d4 (patch)
treeb9ab9bb1336eeba18a505aac48dfff903488077f /gcc/ada/exp_ch13.adb
parentf553e7bc12de8a7d47f51cc5ea0c3d2a22de487e (diff)
downloadgcc-243cae0a5108e18638c9c4844baaf392171130d4.zip
gcc-243cae0a5108e18638c9c4844baaf392171130d4.tar.gz
gcc-243cae0a5108e18638c9c4844baaf392171130d4.tar.bz2
[multiple changes]
2011-08-03 Robert Dewar <dewar@adacore.com> * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb, exp_ch3.adb, exp_ch3.ads: Minor reformatting. 2011-08-03 Pascal Obry <obry@adacore.com> * g-awk.ads: Minor comment fix. 2011-08-03 Sergey Rybin <rybin@adacore.com> * tree_io.ads (ASIS_Version_Number): Update because of the changes in the tree structure related to discriminant constraints. Original_Discriminant cannot be used any more for computing the defining name for the reference to a discriminant. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the function is not visibly tagged, this is not a dispatching call and therfore is not Tag_Indeterminate, even if the function is marked as dispatching on result. From-SVN: r177281
Diffstat (limited to 'gcc/ada/exp_ch13.adb')
-rw-r--r--gcc/ada/exp_ch13.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch13.adb b/gcc/ada/exp_ch13.adb
index 761a281..9f18235 100644
--- a/gcc/ada/exp_ch13.adb
+++ b/gcc/ada/exp_ch13.adb
@@ -214,7 +214,7 @@ package body Exp_Ch13 is
procedure Expand_N_Free_Statement (N : Node_Id) is
Expr : constant Node_Id := Expression (N);
- Typ : Entity_Id := Etype (Expr);
+ Typ : Entity_Id;
begin
-- Certain run-time configurations and targets do not provide support
@@ -232,6 +232,8 @@ package body Exp_Ch13 is
-- Use the base type to perform the collection check
+ Typ := Etype (Expr);
+
if Ekind (Typ) = E_Access_Subtype then
Typ := Etype (Typ);
end if;