From 94bbf008bae624219030c93f6b74def28677e0a7 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 5 Sep 2011 15:19:04 +0200 Subject: [multiple changes] 2011-09-05 Hristian Kirtchev * einfo.adb (Write_Field28_Name): Update the choices for Extra_Formals. * einfo.ads: Update the use of Extra_Formals in various entities. * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code reformatting. Handle the case where the function call returns an incomplete type coming from a limited with context. Generate a reference to the _master when the master id is associated with an access type. (Is_Build_In_Place_Function_Call): Code reformatting. The Alfa mode case must appear first since otherwise we will carry out the function name retrieval regardless of the compilation mode. (Make_Build_In_Place_Call_In_Allocator): Code reformatting. Handle the case where the function call returns an incomplete type coming from a limited with context. Remove the reference creation when adding the task-related actuals, this is now done in Add_Task_Actuals_To_Build_In_Place_Call. * exp_ch7.adb (Make_Set_Finalize_Address_Call): Remove local variable Call. Remove the useless wrapping of Set_Finalize_Address when the finalization master is a build-in-place extra formal. The whole mechanism of controlled allocation in a build-in-place context is already protected by an if statement. * sem_aux.adb (Is_Immutably_Limited_Type): Handle the case where the type might be related to a function which returns an incomplete type coming from a limited with. * sem_ch6.adb (Create_Extra_Formals): Comment reformatting. Handle the case where the function returns an incomplete type coming from a limited with context. 2011-09-05 Johannes Kanig * lib-xref-alfa.adb (Is_Alfa_Reference): Improve test for constant objects and rewrite case statement as /if/elsif/endif. 2011-09-05 Thomas Quinot * sem_ch3.adb, sem_ch4.adb: Minor reformatting. From-SVN: r178537 --- gcc/ada/lib-xref-alfa.adb | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'gcc/ada/lib-xref-alfa.adb') diff --git a/gcc/ada/lib-xref-alfa.adb b/gcc/ada/lib-xref-alfa.adb index 9e154fd..8eef505 100644 --- a/gcc/ada/lib-xref-alfa.adb +++ b/gcc/ada/lib-xref-alfa.adb @@ -604,38 +604,36 @@ package body Alfa is Typ : Character) return Boolean is begin - -- The only references of interest on callable entities are calls. - -- On non-callable entities, the only references of interest are - -- reads and writes. - case Ekind (E) is - when Overloadable_Kind => - return Typ = 's'; + if Ekind (E) in Overloadable_Kind then - -- References to IN parameters and constants are not - -- considered in Alfa section, as these will be translated - -- as constants in the intermediate language for formal - -- verification, and should therefore never appear in frame - -- conditions. + -- The only references of interest on callable entities are + -- calls. On non-callable entities, the only references of + -- interest are reads and writes. - -- What about E_Loop_Parameter??? + return Typ = 's'; + + elsif Is_Constant_Object (E) then + + -- References to constant objects are not considered in Alfa + -- section, as these will be translated as constants in the + -- intermediate language for formal verification, and should + -- therefore never appear in frame conditions. - when E_In_Parameter | E_Constant => return False; - when others => + elsif Present (Etype (E)) and then + Ekind (Etype (E)) in Concurrent_Kind then - -- Objects of Task type or protected type are not Alfa - -- references. + -- Objects of Task type or protected type are not Alfa + -- references. - if Present (Etype (E)) - and then Ekind (Etype (E)) in Concurrent_Kind - then - return False; - end if; + return False; - return Typ = 'r' or else Typ = 'm'; - end case; + else + return Typ = 'r' or else Typ = 'm'; + + end if; end Is_Alfa_Reference; ------------------- -- cgit v1.1