diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-14 14:42:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-14 14:42:04 +0200 |
commit | 124092ee8afddc68ec7905bd951cc647f7de84e6 (patch) | |
tree | 63af518b9244da060ec1650330653be5fc5a02cc /gcc/ada/freeze.adb | |
parent | b447a7578e82b2d2bbe284fa3044f0070a2d8c12 (diff) | |
download | gcc-124092ee8afddc68ec7905bd951cc647f7de84e6.zip gcc-124092ee8afddc68ec7905bd951cc647f7de84e6.tar.gz gcc-124092ee8afddc68ec7905bd951cc647f7de84e6.tar.bz2 |
[multiple changes]
2013-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag263 is now known as Has_Null_Refinement.
(Has_Null_Refinement): New routine.
(Set_Has_Null_Refinement): New routine.
(Write_Entity_Flags): Output the status of flag
Has_Null_Refinement.
* einfo.ads: Add new flag Has_Null_Refinement along with
comment on usage and update all nodes subject to the flag.
(Has_Null_Refinement): New routine along with pragma Inline.
(Set_Has_Null_Refinement): New rouitine along with pragma Inline.
* sem_prag.adb (Analyze_Constituent): Mark a state as having
a null refinement when the sole constituent is "null".
(Analyze_Global_List): Handle null input/output items.
(Analyze_Refined_Global_In_Decl_Part): Add local variable
Has_Null_State. Add logic to handle combinations of states
with null refinements and null global lists and/or items.
(Check_In_Out_States, Check_Input_States, Check_Output_States):
Use attribute Has_Null_Refinement to detect states with
constituents.
(Check_Refined_Global_List): Handle null input/output items.
(Process_Global_Item): Handle states with null refinements.
(Process_Global_List): Handle null input/output items.
2013-10-14 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Entity): Reset Is_True_Constant for
aliased object
* gnat_ugn.texi: Update doc on aliased variables and constants.
2013-10-14 Ed Schonberg <schonberg@adacore.com>
* exp_pakd.adb (Expand_Packed_Element_Reference): If the
reference is an actual in a call, the prefix has not been fully
expanded, to account for the additional expansion for parameter
passing. the prefix itself is a packed reference as well,
recurse to complete the transformation of the prefix.
2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
* exp_dbug.adb (Debug_Renaming_Declaration): Do not
materialize the entity when the renamed object contains an
N_Explicit_Dereference.
* sem_ch8.adb (Analyze_Object_Renaming):
If the renaming comes from source and the renamed object is a
dereference, mark the prefix as needing debug information.
2013-10-14 Doug Rupp <rupp@adacore.com>
* system-vxworks-arm.ads (Stack_Check_Probes, Stack_Check_Limits):
Enable Stack Probes, Disable Stack Limit Checking.
* init.c [VxWorks] (__gnat_inum_to_ivec): Caste return value.
(__gnat_map_signal): Fix signature.
(__gnat_error_handler): Make
static, fix signature, remove prototype, fix prototype warning.
[ARMEL and VxWorks6] (__gnat_map_signal): Check and re-arm guard
page for storage_error.
* exp_pakd.adb: Minor reformatting.
From-SVN: r203526
Diffstat (limited to 'gcc/ada/freeze.adb')
-rw-r--r-- | gcc/ada/freeze.adb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 8c9ceb0..b810a18 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3345,6 +3345,24 @@ package body Freeze is Check_Address_Clause (E); + -- Reset Is_True_Constant for aliased object. We consider that + -- the fact that something is aliased may indicate that some + -- funny business is going on, e.g. an aliased object is passed + -- by reference to a procedure which captures the address of + -- the object, which is later used to assign a new value. Such + -- code is highly dubious, but we choose to make it "work" for + -- aliased objects. + + -- However, we don't do that for internal entities. We figure + -- that if we deliberately set Is_True_Constant for an internal + -- entity, e.g. a dispatch table entry, then we mean it! + + if (Is_Aliased (E) or else Is_Aliased (Etype (E))) + and then not Is_Internal_Name (Chars (E)) + then + Set_Is_True_Constant (E, False); + end if; + -- If the object needs any kind of default initialization, an -- error must be issued if No_Default_Initialization applies. -- The check doesn't apply to imported objects, which are not @@ -3521,7 +3539,6 @@ package body Freeze is end if; end; end if; - end if; -- Case of a type or subtype being frozen |