debug.adb: Document debug flag -gnatd.1.

2014-06-13  Robert Dewar  <dewar@adacore.com>

	* debug.adb: Document debug flag -gnatd.1.
	* layout.adb (Layout_Type): Size change for anonymous access
	types under -gnatd.1.
	* sem_ch3.adb (Replace_Type): Size change for anonymous access
	types under -gnatd.1.

From-SVN: r211619
This commit is contained in:
Robert Dewar 2014-06-13 10:04:27 +00:00 committed by Arnaud Charlet
parent 446ebdbbd0
commit 19634e40b7
4 changed files with 42 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2014-06-13 Robert Dewar <dewar@adacore.com>
* debug.adb: Document debug flag -gnatd.1.
* layout.adb (Layout_Type): Size change for anonymous access
types under -gnatd.1.
* sem_ch3.adb (Replace_Type): Size change for anonymous access
types under -gnatd.1.
2014-06-13 Robert Dewar <dewar@adacore.com> 2014-06-13 Robert Dewar <dewar@adacore.com>
* layout.adb (Layout_Type): Anonymous access types designating * layout.adb (Layout_Type): Anonymous access types designating

View File

@ -155,7 +155,7 @@ package body Debug is
-- d8 Force opposite endianness in packed stuff -- d8 Force opposite endianness in packed stuff
-- d9 Allow lock free implementation -- d9 Allow lock free implementation
-- d.1 -- d.1 Disable fix to make anonymous access types thin
-- d.2 -- d.2
-- d.3 -- d.3
-- d.4 -- d.4
@ -733,6 +733,12 @@ package body Debug is
-- d9 This allows lock free implementation for protected objects -- d9 This allows lock free implementation for protected objects
-- (see Exp_Ch9). -- (see Exp_Ch9).
-- d.1 There is a problem with making anonymous access types which refer
-- to an unconstrained array thick. And we have a fix, which is to
-- make them thin always. Search for Debug_Flag_Dot_1 in layout.adb
-- and sem_ch3.adb to see the explanation for why we don't enable this
-- fix for now unless this debug flag is set.
------------------------------------------ ------------------------------------------
-- Documentation for Binder Debug Flags -- -- Documentation for Binder Debug Flags --
------------------------------------------ ------------------------------------------

View File

@ -2466,7 +2466,13 @@ package body Layout is
-- into strange conformance problems between two types, one of which -- into strange conformance problems between two types, one of which
-- can see that something is unconstrained and one of which cannot. -- can see that something is unconstrained and one of which cannot.
elsif Ekind (E) = E_Anonymous_Access_Type then elsif Ekind (E) = E_Anonymous_Access_Type
-- For now eneable this only if debug flag -gnatd.1 is set, since
-- we have some regressions in gnatcoll that need sorting out???
and then Debug_Flag_Dot_1
then
Init_Size (E, System_Address_Size); Init_Size (E, System_Address_Size);
-- For other access types, we use either address size, or, if a fat -- For other access types, we use either address size, or, if a fat

View File

@ -13576,7 +13576,26 @@ package body Sem_Ch3 is
-- case we can't see it yet (full type declaration not seen -- case we can't see it yet (full type declaration not seen
-- yet), so we default to thin in that case anyway. -- yet), so we default to thin in that case anyway.
-- For now, for the access to unconstrained array scase, we
-- are making the above change only if debug flag -gnatd.1
-- is set. That's because the change, though almost
-- certainly correct, is causing gnatcoll regressions
-- which we have to sort out ???
if Is_Array_Type (Desig_Typ)
and then not Is_Constrained (Desig_Typ)
and then not Debug_Flag_Dot_1
then
Init_Size (Acc_Type, 2 * System_Address_Size);
-- Normal case. This is what we intend to do always when we
-- finally install the change discussed above. In the case
-- of access to unconstrained array, then we take this path
-- for now only if -gnatd.1 debug flag is set.
else
Init_Size (Acc_Type, System_Address_Size); Init_Size (Acc_Type, System_Address_Size);
end if;
-- Set remaining characterstics of anonymous access type -- Set remaining characterstics of anonymous access type