+2015-11-12 Philippe Gil <gil@adacore.com>
+
+ * g-debpoo.adb (Print_Address): print address in hexadecimal as
+ in previous GNAT version (without secondary stack use)
+ (Deallocate): Deallocate calling once Unlock_Task.all when it
+ raise exception.
+
+2015-11-12 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Subtype_Declaration): Remove redundant
+ copying of dimensions from parent type to subtype. This is
+ properly done in Analyze_Dimension.
+ * sem_dim.adb (Analyze_Dimension_Subtype_Declaration): Add entity
+ to error message, so that reference to entity can be formatted
+ properly.
+ * opt.ads: Fix typo.
+
2015-11-12 Bob Duff <duff@adacore.com>
* impunit.adb, lib-xref.ads, restrict.ads, scos.ads, sem_attr.ads,
type My_Address is mod Memory_Size;
function To_My_Address is new Ada.Unchecked_Conversion
(System.Address, My_Address);
+ Address_To_Print : My_Address := To_My_Address (Addr);
+ type Hexadecimal_Element is range 0 .. 15;
+ Hexadecimal_Characters : constant array
+ (Hexadecimal_Element) of Character :=
+ ('0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
+ pragma Warnings
+ (Off, "types for unchecked conversion have different sizes");
+ function To_Hexadecimal_Element is new Ada.Unchecked_Conversion
+ (My_Address, Hexadecimal_Element);
+ pragma Warnings
+ (On, "types for unchecked conversion have different sizes");
+ Number_Of_Hexadecimal_Characters_In_Address : constant Natural :=
+ Standard'Address_Size / 4;
+ type Hexadecimal_Elements_Range is
+ range 1 .. Number_Of_Hexadecimal_Characters_In_Address;
+ Hexadecimal_Elements : array (Hexadecimal_Elements_Range) of
+ Hexadecimal_Element;
begin
- Put (File, My_Address'Image (To_My_Address (Addr)));
+ for Index in Hexadecimal_Elements_Range loop
+ Hexadecimal_Elements (Index) :=
+ To_Hexadecimal_Element (Address_To_Print mod 16);
+ Address_To_Print := Address_To_Print / 16;
+ end loop;
+ Put (File, "0x");
+ for Index in reverse Hexadecimal_Elements_Range loop
+ Put (File, Hexadecimal_Characters (Hexadecimal_Elements (Index)));
+ end loop;
end Print_Address;
--------------
is
pragma Unreferenced (Alignment);
+ Unlock_Task_Required : Boolean := False;
Header : constant Allocation_Header_Access :=
Header_Of (Storage_Address);
Valid : Boolean;
begin
<<Deallocate_Label>>
Lock_Task.all;
+ Unlock_Task_Required := True;
Valid := Is_Valid (Storage_Address);
if not Valid then
+ Unlock_Task_Required := False;
Unlock_Task.all;
if Storage_Address = System.Null_Address then
end if;
elsif Header.Block_Size < 0 then
+ Unlock_Task_Required := False;
Unlock_Task.all;
if Pool.Raise_Exceptions then
raise Freeing_Deallocated_Storage;
-- Do not physically release the memory here, but in Alloc.
-- See comment there for details.
+ Unlock_Task_Required := False;
Unlock_Task.all;
end if;
exception
when others =>
- Unlock_Task.all;
+ if Unlock_Task_Required then
+ Unlock_Task.all;
+ end if;
raise;
end Deallocate;
Style_Check_Main : Boolean := False;
-- GNAT
-- Set True if Style_Check was set for the main unit. This is used to
- -- renable style checks for units in the mail extended source that get
+ -- enable style checks for units in the main extended source that get
-- with'ed indirectly. It is set True by use of either the -gnatg or
-- -gnaty switches, but not by use of the Style_Checks pragma.
-- unit. This affects setting of the assert/debug pragma switches, which
-- are normally set false by default for an internal unit, except when the
-- internal unit is the main unit, in which case we use the command line
- -- settings).
+ -- settings.
procedure Restore_Opt_Config_Switches (Save : Config_Switches_Type);
-- This procedure restores a set of switch values previously saved by a
Set_Scalar_Range (Id, Scalar_Range (T));
Set_Digits_Value (Id, Digits_Value (T));
Set_Is_Constrained (Id, Is_Constrained (T));
- Copy_Dimensions (From => T, To => Id);
+
+ -- If the floating point type has dimensions, these will be
+ -- inherited subsequently when Analyze_Dimensions is called.
when Signed_Integer_Kind =>
Set_Ekind (Id, E_Signed_Integer_Subtype);