diff options
author | Thomas Quinot <quinot@adacore.com> | 2013-10-17 13:58:39 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-10-17 15:58:39 +0200 |
commit | 064f4527c45595301de59346f8bf3e200a93f966 (patch) | |
tree | 659d72d41960b0109772adedd106fcef972cd3fa /gcc/ada/checks.adb | |
parent | 51245e2db08facc4d1ce09aa57782b43526c8055 (diff) | |
download | gcc-064f4527c45595301de59346f8bf3e200a93f966.zip gcc-064f4527c45595301de59346f8bf3e200a93f966.tar.gz gcc-064f4527c45595301de59346f8bf3e200a93f966.tar.bz2 |
exp_util.adb (Get_Current_Value_Condition, [...]): Handle the case of expressions with actions * exp_util.adb (Insert_Actions):...
2013-10-17 Thomas Quinot <quinot@adacore.com>
* exp_util.adb (Get_Current_Value_Condition,
Set_Current_Value_Condition): Handle the case of expressions
with actions * exp_util.adb (Insert_Actions): Handle the case
of an expression with actions whose Actions list is empty.
* exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An
expression with actions that has no Actions and whose Expression
is side effect free is itself side effect free.
* exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on
temporary 'R' (Def_Id), which is in general an access to Exp_Type, not
an Exp_Type.
* sem_res.adb (Resolve): For an expression with
actions, resolve the expression early. * sem_res.adb
(Resolve_Expression_With_Actions): Rewrite an expression with
actions whose value is compile time known and which has no
actions into just its expression, so that its constant value is
available downstream.
* sem_res.adb (Resolve_Short_Circuit):
Wrap the left operand in an expression with actions to contain
any required finalization actions.
* exp_ch4.adb (Expand_Expression_With_Actions): For an
expression with actions returning a Boolean expression, ensure
any finalization action is kept within the Actions list.
* sem_warn.adb (Check_References, Check_Unset_Reference): add
missing circuitry to handle expressions with actions.
* checks.adb (Ensure_Valid): For an expression with actions,
insert the validity check on the Expression.
* sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression
with actions that has a non-empty Actions list is not static. An
expression with actions that has an empty Actions list has the
static ranges of its Expression.
* sem_util.adb (Has_No_Obvious_Side_Effects): An expression with
actions with an empty Actions list has no obvious side effects
if its Expression itsekf has no obvious side effects.
From-SVN: r203763
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 65dedc2..328e05e5 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -5092,6 +5092,13 @@ package body Checks is then return; + -- For an expression with actions, we want to insert the validity check + -- on the final Expression. + + elsif Nkind (Expr) = N_Expression_With_Actions then + Ensure_Valid (Expression (Expr)); + return; + -- An annoying special case. If this is an out parameter of a scalar -- type, then the value is not going to be accessed, therefore it is -- inappropriate to do any validity check at the call site. |