diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 17:45:30 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-01 17:45:30 +0200 |
commit | 4230bdb759b717d87186ccb1df225f241322386b (patch) | |
tree | befa9ae07ae41881d967d26ca6b36a0e2eddfcd4 /gcc/ada/exp_ch3.adb | |
parent | 2010d0783d695583e72d0f412278caf4be041776 (diff) | |
download | gcc-4230bdb759b717d87186ccb1df225f241322386b.zip gcc-4230bdb759b717d87186ccb1df225f241322386b.tar.gz gcc-4230bdb759b717d87186ccb1df225f241322386b.tar.bz2 |
[multiple changes]
2011-08-01 Vincent Celier <celier@adacore.com>
* s-parame-vms-ia64.ads: Fix typo in comment
Minor reformatting
* s-parame-vms-restrict.ads: Removed, unused.
2011-08-01 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb
(Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
* sem_ch3.adb
(Constrain_Index): Remove side effects in the evaluation of the bounds.
* sem_ch3.ads, sem_ch3.adb
(Is_Constant_Bound): New extended version of the subprogram that was
previously located inside function Exp_Ch3.Is_Variable_Size_Array.
Moved here since it is shared by routines of sem_ch3 and exp_ch3.
* sem_aux.ads (Constant_Value): Fix typo in comment.
* checks.adb (Generate_Index_Checks): New implementation which, for
array objects with constant bounds, generates the runtime check
referencing the bounds of the array type. For other cases this routine
provides its previous behavior obtaining such values from the array
object.
* sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
parent type.
* atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
we cannot have semantic interpretations of the new node.
From-SVN: r177051
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r-- | gcc/ada/exp_ch3.adb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 4ee02b7..c1e83bb 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -7580,37 +7580,8 @@ package body Exp_Ch3 is ---------------------------- function Is_Variable_Size_Array (E : Entity_Id) return Boolean is - - function Is_Constant_Bound (Exp : Node_Id) return Boolean; - -- To simplify handling of array components. Determines whether the - -- given bound is constant (a constant or enumeration literal, or an - -- integer literal) as opposed to per-object, through an expression - -- or a discriminant. - - ----------------------- - -- Is_Constant_Bound -- - ----------------------- - - function Is_Constant_Bound (Exp : Node_Id) return Boolean is - begin - if Nkind (Exp) = N_Integer_Literal then - return True; - else - return - Is_Entity_Name (Exp) - and then Present (Entity (Exp)) - and then - (Ekind (Entity (Exp)) = E_Constant - or else Ekind (Entity (Exp)) = E_Enumeration_Literal); - end if; - end Is_Constant_Bound; - - -- Local variables - Idx : Node_Id; - -- Start of processing for Is_Variable_Sized_Array - begin pragma Assert (Is_Array_Type (E)); |