This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ada: Initialize OUT access type parameters of an entry call
- From: Arnaud Charlet <charlet at adacore dot com>
- To: Samuel Tardieu <sam at rfc1149 dot net>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Dec 2007 09:28:58 +0100
- Subject: Re: [PATCH] ada: Initialize OUT access type parameters of an entry call
- References: <20071201144834.55645C407C@mail2.rfc1149.net>
> gcc/ada/
> PR ada/21489
> * exp_ch9.adb (Build_Simple_Entry_Call): Initialize OUT access type
> parameters of an entry call.
Patch is OK with the following comment updates:
<<
--- exp_ch9.adb 2007/12/03 20:30:22 1.626
+++ exp_ch9.adb 2007/12/04 21:39:14 1.627
@@ -3001,8 +3002,12 @@ package body Exp_Ch9 is
-- We have to make an assignment statement separate for the
-- case of limited type. We cannot assign it unless the
-- Assignment_OK flag is set first.
+ -- An out formal of an access type must also be initialized
+ -- from the actual, as stated in RM 6.4.1 (13).
- if Ekind (Formal) /= E_Out_Parameter then
+ if Ekind (Formal) /= E_Out_Parameter
+ or else Is_Access_Type (Etype (Formal))
+ then
N_Var :=
New_Reference_To (Defining_Identifier (N_Node), Loc);
Set_Assignment_OK (N_Var);