diff options
author | Robert Dewar <dewar@adacore.com> | 2014-07-30 14:32:24 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-30 16:32:24 +0200 |
commit | 41a58113f8e2d6bc4bd52e168e7079053cda5eb9 (patch) | |
tree | b1cf07aef5bdb3dcf68a1d943d6495a81c0d1952 /gcc/ada/exp_ch3.adb | |
parent | 2b4c962d787e092de9af83d2a3ca568ce3ca69bb (diff) | |
download | gcc-41a58113f8e2d6bc4bd52e168e7079053cda5eb9.zip gcc-41a58113f8e2d6bc4bd52e168e7079053cda5eb9.tar.gz gcc-41a58113f8e2d6bc4bd52e168e7079053cda5eb9.tar.bz2 |
exp_aggr.adb: Update comments.
2014-07-30 Robert Dewar <dewar@adacore.com>
* exp_aggr.adb: Update comments.
* a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
reformatting.
2014-07-30 Robert Dewar <dewar@adacore.com>
* cstand.adb (New_Standard_Entity): New version takes name
string to call Make_Name.
(Create_Standard): Use this routine to set name before setting other
fields.
2014-07-30 Robert Dewar <dewar@adacore.com>
* exp_attr.adb (Expand_Attribute, case First): Rewrite simple
entity reference.
(Expand_Attribute, case Last): Ditto.
* exp_ch3.adb (Constrain_Index): New calling sequence for
Process_Range_Expr_In_Decl.
(Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
problematical case.
* sem_ch3.adb (Constrain_Index): New calling sequence for
Process_Range_Expr_In_Decl.
(Set_Scalar_Range_For_Subtype): ditto.
(Process_Range_Expr_In_Decl): Create constants to hold bounds for
subtype.
* sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
* sem_eval.adb (Compile_Time_Compare): Make sure we use base
types if we are not assuming no invalid values.
From-SVN: r213286
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r-- | gcc/ada/exp_ch3.adb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index b9c7c99..c928247 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -3234,7 +3234,7 @@ package body Exp_Ch3 is begin if Nkind (S) = N_Range then - Process_Range_Expr_In_Decl (S, T, Check_List); + Process_Range_Expr_In_Decl (S, T, Check_List => Check_List); end if; end Constrain_Index; @@ -5844,9 +5844,14 @@ package body Exp_Ch3 is return; -- For discrete types, set the Is_Known_Valid flag if the - -- initializing value is known to be valid. + -- initializing value is known to be valid. Only do this for + -- source assignments, since otherwise we can end up turning + -- on the known valid flag prematurely from inserted code. - elsif Is_Discrete_Type (Typ) and then Expr_Known_Valid (Expr) then + elsif Comes_From_Source (N) + and then Is_Discrete_Type (Typ) + and then Expr_Known_Valid (Expr) + then Set_Is_Known_Valid (Def_Id); elsif Is_Access_Type (Typ) then |