diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-05 15:19:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-05 15:19:04 +0200 |
commit | 94bbf008bae624219030c93f6b74def28677e0a7 (patch) | |
tree | bc9b51cc68bed850fac9c55ec7794f5fab718cbd /gcc/ada/lib-xref-alfa.adb | |
parent | aeae67edd7af1208362e615cf89dd2e9cba942d5 (diff) | |
download | gcc-94bbf008bae624219030c93f6b74def28677e0a7.zip gcc-94bbf008bae624219030c93f6b74def28677e0a7.tar.gz gcc-94bbf008bae624219030c93f6b74def28677e0a7.tar.bz2 |
[multiple changes]
2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
* 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 <kanig@adacore.com>
* 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 <quinot@adacore.com>
* sem_ch3.adb, sem_ch4.adb: Minor reformatting.
From-SVN: r178537
Diffstat (limited to 'gcc/ada/lib-xref-alfa.adb')
-rw-r--r-- | gcc/ada/lib-xref-alfa.adb | 44 |
1 files changed, 21 insertions, 23 deletions
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; ------------------- |