summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 10:04:27 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 10:04:27 +0000
commit21f33db6c1a075b3c6283fc338e84965eece2a16 (patch)
tree9487715cc423d4e6a6b9b2ebeb0ea19ca404b7c3 /gcc/ada/sem_ch3.adb
parent88dc13baa0f644bbf2c9395ac1fb05ddc7b3aae1 (diff)
downloadgcc-21f33db6c1a075b3c6283fc338e84965eece2a16.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb21
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 938c28ea6b1..03e91543c28 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -13576,7 +13576,26 @@ package body Sem_Ch3 is
-- case we can't see it yet (full type declaration not seen
-- yet), so we default to thin in that case anyway.
- Init_Size (Acc_Type, System_Address_Size);
+ -- 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);
+ end if;
-- Set remaining characterstics of anonymous access type