+2018-05-22 Ed Schonberg <schonberg@adacore.com>
+
+ * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
+ delayed aspects, analyze them now, os that the representation of the
+ type (size, bounds) can be computed and validated.
+
2018-05-22 Olivier Hainque <hainque@adacore.com>
* libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
-- Start of processing for Freeze_Fixed_Point_Type
begin
+ -- The type, or its first subtype if we are freezing the anonymous
+ -- base, may have a delayed Small aspect. It must be analyzed now,
+ -- so that all characteristics of the type (size, bounds) can be
+ -- computed and validated in the call to Minimum_Size that follows.
+
+ if Has_Delayed_Aspects (First_Subtype (Typ)) then
+ Analyze_Aspects_At_Freeze_Point (First_Subtype (Typ));
+ Set_Has_Delayed_Aspects (First_Subtype (Typ), False);
+ end if;
+
-- If Esize of a subtype has not previously been set, set it now
if Unknown_Esize (Typ) then
+2018-05-22 Ed Schonberg <schonberg@adacore.com>
+
+ * gnat.dg/fixedpnt3.adb: New testcase.
+
2018-05-22 Justin Squirek <squirek@adacore.com>
* gnat.dg/pure_function1.adb, gnat.dg/pure_function1.ads,
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+procedure Fixedpnt3 is
+ C_Unit : constant := 0.001;
+
+ type T_Fixed_Point is
+ delta C_Unit range (-2 ** 63) * C_Unit .. (2 ** 63 - 1) * C_Unit
+ with Size => 64, Small => C_Unit;
+
+ type T_Short_Fixed_Point is
+ new T_Fixed_Point range (-2 ** 31) * C_Unit .. (2 ** 31 - 1) * C_Unit
+ with Size => 32;
+begin
+ null;
+end Fixedpnt3;