From cae81f177de95c5de06a61f769f3008925ebcb35 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Tue, 2 Aug 2011 10:02:23 +0000 Subject: 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 * 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 --- gcc/ada/sem_res.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/ada/sem_res.adb') 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 -- cgit v1.1