-- integer type. This is a case where top level processing is required to
-- handle overflow checks in subtrees.
- procedure Fixup_Universal_Fixed_Operation (N : Node_Id);
- -- N is a N_Op_Divide or N_Op_Multiply node whose result is universal
- -- fixed. We do not have such a type at runtime, so the purpose of this
- -- routine is to find the real type by looking up the tree. We also
- -- determine if the operation must be rounded.
-
procedure Get_First_Index_Bounds (T : Entity_Id; Lo, Hi : out Uint);
-- T is an array whose index bounds are all known at compile time. Return
-- the value of the low and high bounds of the first index of T.
-- have special circuitry in Expand_N_Type_Conversion to promote both of
-- the operands to type Integer.
+ procedure Fixup_Universal_Fixed_Operation (N : Node_Id);
+ -- N is a N_Op_Divide or N_Op_Multiply node whose result is universal
+ -- fixed. We do not have such a type at runtime, so the purpose of this
+ -- routine is to find the real type by looking up the tree. We also
+ -- determine if the operation must be rounded.
+
end Exp_Ch4;
when N_Op_Ne =>
Expand_SPARK_N_Op_Ne (N);
+ -- Resolution of type conversion relies on minimal expansion of
+ -- fixedpoint operations to insert the range check on their result.
+
+ when N_Op_Multiply | N_Op_Divide =>
+ if Etype (N) = Universal_Fixed then
+ Exp_Ch4.Fixup_Universal_Fixed_Operation (N);
+ end if;
+
when N_Freeze_Entity =>
-- Currently we only expand type freeze entities, so ignore other
-- freeze entites, because it is expensive to create a suitable