[Ada] ACATS 4.1L - B452002 - Wrong universal access "=" rules
authorArnaud Charlet <charlet@adacore.com>
Tue, 14 Apr 2020 07:29:43 +0000 (03:29 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 18 Jun 2020 09:08:20 +0000 (05:08 -0400)
commit606e70fd3d8abf2a74fab56faeecfb8e249178ca
tree3e8702851e60b29ac26bdd932f355989da8136d8
parent41e52aa5859d5ec202f05ec2e36984b7cb708fc3
[Ada] ACATS 4.1L - B452002 - Wrong universal access "=" rules

2020-06-18  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* sem_ch4.adb (Find_Equality_Types.Check_Access_Object_Types):
New function, used to implement RM 4.5.2 (9.6/2).
(Find_Equality_Types.Check_Compatible_Profiles): New function,
used to implement RM 4.5.2(9.7/2).
(Find_Equality_Types.Reference_Anonymous_Access_Type): New
function.
(Find_Equality_Types.Try_One_Interp): Fix handling of anonymous
access types which was accepting both too much and too little.
Remove accumulated special and incomplete cases for
instantiations, replaced by Has_Compatible_Type.
(Analyze_Overloaded_Selected_Component): Use
Is_Anonymous_Access_Type instead of Ekind_In.
* sem_res.adb: Code cleanup and bug fix: use
Is_Anonymous_Access_Type instead of Ekind_In.  Relax checking of
anonymous access parameter when universal_access "=" is
involved.
* sem_type.adb: Likewise.
(Find_Unique_Type): Move code from here...
(Specific_Type): ...to here. Also add missing handling of access
to class wide types.
* einfo.ads, einfo.adb (Is_Access_Object_Type): New.
gcc/ada/einfo.adb
gcc/ada/einfo.ads
gcc/ada/sem_ch4.adb
gcc/ada/sem_res.adb
gcc/ada/sem_type.adb