diff options
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/sem_type.adb | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 19e7fea..f18df82 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2019-12-12 Ed Schonberg <schonberg@adacore.com> + + * sem_type.adb (Find_Unique_Type): A call to the universal + access equality operator requires one operand to be a universal + access, and the other to be an access type. There is no + requirement, as previously implied by this routine, that + pool-specific access types were illegal in this context. + 2019-12-12 Steve Baird <baird@adacore.com> * sem_ch6.adb diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index fc50524..e5d01dd 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -2286,12 +2286,13 @@ package body Sem_Type is -- ration "type P is access Integer" and an anonymous access to Integer, -- P is convertible to "access Integer" by 4.6 (24.11-24.15), but there -- is no rule in 4.6 that allows "access Integer" to be converted to P. + -- Note that this does not preclude one operand to be a pool-specific + -- access type, as a previous version of this code enforced. elsif Ada_Version >= Ada_2005 and then Ekind_In (Etype (L), E_Anonymous_Access_Type, E_Anonymous_Access_Subprogram_Type) and then Is_Access_Type (Etype (R)) - and then Ekind (Etype (R)) /= E_Access_Type then return Etype (L); @@ -2299,7 +2300,6 @@ package body Sem_Type is and then Ekind_In (Etype (R), E_Anonymous_Access_Type, E_Anonymous_Access_Subprogram_Type) and then Is_Access_Type (Etype (L)) - and then Ekind (Etype (L)) /= E_Access_Type then return Etype (R); |