aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 8dd7a39..8a542ad 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -7393,6 +7393,13 @@ package body Checks is
if Is_Variable (Exp) then
Var_Id := Make_Temporary (Loc, 'T', Exp);
+ -- Because we could be dealing with a transient scope which would
+ -- cause our object declaration to remain unanalyzed we must do
+ -- some manual decoration.
+
+ Set_Ekind (Var_Id, E_Variable);
+ Set_Etype (Var_Id, Typ);
+
Insert_Action (Exp,
Make_Object_Declaration (Loc,
Defining_Identifier => Var_Id,