diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-07 13:38:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-07 13:38:45 +0000 |
commit | 865909d3870128ebe441cad8e9bf85899fe51ae0 (patch) | |
tree | de9464c08d324cf727aa591acdf3d8cad2584ad6 /gcc/ada/exp_ch4.adb | |
parent | ad73b39701cd115f28e1a536c66d4a999de3f55c (diff) | |
download | gcc-865909d3870128ebe441cad8e9bf85899fe51ae0.tar.gz |
2009-07-07 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Expand_Actuals): Call Add_Call_By_Copy_Code for in out
parameters when the subtype of the actual is not known to be a subrange
of the formal's subtype.
(Expand_Call): Generate a range check only in the E_In_parameter case
(in out parameter range checks are now handled in Expand_Actuals).
* exp_ch4.adb (Expand_N_Slice): Restore code that calls
Enable_Range_Check.
2009-07-07 Robert Dewar <dewar@adacore.com>
* a-stwise.adb, a-stzsea.adb, a-strsea.adb: Add comments
2009-07-07 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): Handle access type whose
designated type comes from a limited views.
2009-07-07 Emmanuel Briot <briot@adacore.com>
* prj.ads, prj-nmsc.adb (Mark_Excluded_Sources): Fix handling of
locally removed files that are later made visible again in an importing
project.
2009-07-07 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Clarify documentation of Stream_Convert pragma
2009-07-07 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Add an example to the description of gnatcheck
'Style_Checks' rule option.
2009-07-07 Tristan Gingold <gingold@adacore.com>
* seh_init.c: Fix inline assembly statement in seh_init.c
2009-07-07 Ed Schonberg <schonberg@adacore.com>
* sem_warn.adb (Check_References): Do not emit warnings on formals of
an entry body. Only the formals of the entry declaration are traced.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 4d50e0b9ccb..b235db0adfb 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -7444,6 +7444,32 @@ package body Exp_Ch4 is Make_Build_In_Place_Call_In_Anonymous_Context (Pfx); end if; + -- Range checks are potentially also needed for cases involving a slice + -- indexed by a subtype indication, but Do_Range_Check can currently + -- only be set for expressions ??? + + if not Index_Checks_Suppressed (Ptp) + and then (not Is_Entity_Name (Pfx) + or else not Index_Checks_Suppressed (Entity (Pfx))) + and then Nkind (Discrete_Range (N)) /= N_Subtype_Indication + + -- Do not enable range check to nodes associated with the frontend + -- expansion of the dispatch table. We first check if Ada.Tags is + -- already loaded to avoid the addition of an undesired dependence + -- on such run-time unit. + + and then + (not Tagged_Type_Expansion + or else not + (RTU_Loaded (Ada_Tags) + and then Nkind (Prefix (N)) = N_Selected_Component + and then Present (Entity (Selector_Name (Prefix (N)))) + and then Entity (Selector_Name (Prefix (N))) = + RTE_Record_Component (RE_Prims_Ptr))) + then + Enable_Range_Check (Discrete_Range (N)); + end if; + -- The remaining case to be handled is packed slices. We can leave -- packed slices as they are in the following situations: |