From 25e29378a7f781e861ed4efead33b7c62ef1eab3 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 21 Oct 2010 11:55:51 +0200 Subject: [multiple changes] 2010-10-21 Javier Miranda * sem_attr.adb (Resolve_Attribute): After replacing the range attribute node with a range expression ensure that its evaluation will not have side effects. * exp_ch5.adb (Expand_Assign_Array): Propagate the Parent to the unchecked conversion node generated to handle assignment of private types. Required to allow climbing the subtree if Insert_Action is invoked later. 2010-10-21 Robert Dewar * par-ch3.adb (P_Interface_Type_Definition): Allow for possibility of aspect clause presence terminating the type definition. From-SVN: r165757 --- gcc/ada/sem_attr.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/ada/sem_attr.adb') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 264ea69..6b5741a 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -8791,6 +8791,11 @@ package body Sem_Attr is Rewrite (N, Make_Range (Loc, LB, HB)); Analyze_And_Resolve (N, Typ); + -- Ensure that the expanded range does not have side effects + + Force_Evaluation (LB); + Force_Evaluation (HB); + -- Normally after resolving attribute nodes, Eval_Attribute -- is called to do any possible static evaluation of the node. -- However, here since the Range attribute has just been -- cgit v1.1