aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2014-06-13 10:04:27 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 12:04:27 +0200
commit19634e40b7f905c8bb5ff7f1095829b91b718532 (patch)
tree9487715cc423d4e6a6b9b2ebeb0ea19ca404b7c3 /gcc/ada/sem_ch3.adb
parent446ebdbbd062cec9a8db76dcd5882683268d00a8 (diff)
downloadgcc-19634e40b7f905c8bb5ff7f1095829b91b718532.zip
gcc-19634e40b7f905c8bb5ff7f1095829b91b718532.tar.gz
gcc-19634e40b7f905c8bb5ff7f1095829b91b718532.tar.bz2
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
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 938c28e..03e9154 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