diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-06-13 12:03:43 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-06-13 12:03:43 +0200 |
commit | 446ebdbbd062cec9a8db76dcd5882683268d00a8 (patch) | |
tree | 78623ddf8772ac78c5814c15f74fe937c361bd95 /gcc/ada/layout.adb | |
parent | c86cf71483eb73bf8d637e4c9d6caef3b67b09a2 (diff) | |
download | gcc-446ebdbbd062cec9a8db76dcd5882683268d00a8.zip gcc-446ebdbbd062cec9a8db76dcd5882683268d00a8.tar.gz gcc-446ebdbbd062cec9a8db76dcd5882683268d00a8.tar.bz2 |
[multiple changes]
2014-06-13 Robert Dewar <dewar@adacore.com>
* layout.adb (Layout_Type): Anonymous access types designating
unconstrained arrays are always thin pointers.
* sem_ch3.adb (Replace_Type): Anonymous access types designating
unconstrained arrays are always thin pointers.
2014-06-13 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
to resolve the prefix of an attribute that is an entity name
and may be a parameterless call. Minor code reorganization.
From-SVN: r211618
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r-- | gcc/ada/layout.adb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index f1a833b..618b0f8 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -2462,19 +2462,11 @@ package body Layout is Set_Size_Info (E, Base_Type (E)); Set_RM_Size (E, RM_Size (Base_Type (E))); - -- Anonymous access types in subprogram specifications are always - -- thin. In the unconstrained case we always use thin pointers for - -- anonymous access types, because otherwise we get into strange - -- conformance problems between two types, one of which can see - -- that something is unconstrained and one of which cannot. The - -- object of an extended return is treated similarly. - - elsif Ekind (E) = E_Anonymous_Access_Type - and then (Nkind_In (Associated_Node_For_Itype (E), - N_Function_Specification, - N_Procedure_Specification) - or else Ekind (Scope (E)) = E_Return_Statement) - then + -- Anonymous access types are always thin, because otherwise we get + -- into strange conformance problems between two types, one of which + -- can see that something is unconstrained and one of which cannot. + + elsif Ekind (E) = E_Anonymous_Access_Type then Init_Size (E, System_Address_Size); -- For other access types, we use either address size, or, if a fat |