diff options
author | Javier Miranda <miranda@adacore.com> | 2011-08-02 10:02:23 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-02 12:02:23 +0200 |
commit | cae81f177de95c5de06a61f769f3008925ebcb35 (patch) | |
tree | 496ee54f86dd92f4260963f3fd5496ca9fcb2d5e /gcc/ada/sem_res.adb | |
parent | 218e6deed7eb149fdf8cc25fa80d9220cd9e8402 (diff) | |
download | gcc-cae81f177de95c5de06a61f769f3008925ebcb35.zip gcc-cae81f177de95c5de06a61f769f3008925ebcb35.tar.gz gcc-cae81f177de95c5de06a61f769f3008925ebcb35.tar.bz2 |
exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an in-mode parameter whose type is an access type since it...
2011-08-02 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
in-mode parameter whose type is an access type since it can be used to
modify its designated object. Enforce code that handles as safe an
access type that is not access-to-constant but it is the result of a
previous removal of side-effects.
(Remove_Side_Effects): Minor code reorganization of cases which require
no action. Done to incorporate documentation on new cases uncovered
working in this ticket: no action needed if this routine was invoked
too early and the nodes are not yet decorated.
* sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
to routine Remove_Side_Effects by calls to Force_Evaluation since they
were issued with actuals that are implicitly provided by
Force_Evaluation.
From-SVN: r177120
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index d6a1ccf..a94ecc2 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8631,8 +8631,8 @@ package body Sem_Res is -- Ensure that side effects in the bounds are properly handled - Remove_Side_Effects (Low_Bound (Drange), Variable_Ref => True); - Remove_Side_Effects (High_Bound (Drange), Variable_Ref => True); + Force_Evaluation (Low_Bound (Drange)); + Force_Evaluation (High_Bound (Drange)); -- Do not apply the range check to nodes associated with the -- frontend expansion of the dispatch table. We first check |