+2019-12-13 Steve Baird <baird@adacore.com>
+
+ * sem_res.adb (Resolve, Valid_Conversion): Add Base_Type call
+ when testing whether a type is a general access type.
+
2019-12-13 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Unchecked_Type_Conversion): Generate an
-- convert implicitly are allowed in membership tests).
if Ada_Version >= Ada_2012
- and then Ekind (Ctx_Type) = E_General_Access_Type
+ and then Ekind (Base_Type (Ctx_Type)) = E_General_Access_Type
and then Ekind (Etype (N)) = E_Anonymous_Access_Type
and then Nkind (Parent (N)) not in N_Membership_Test
then
if Ada_Version >= Ada_2012
and then not Comes_From_Source (N)
and then Is_Rewrite_Substitution (N)
- and then Ekind (Target_Type) = E_General_Access_Type
+ and then Ekind (Base_Type (Target_Type)) = E_General_Access_Type
and then Ekind (Opnd_Type) = E_Anonymous_Access_Type
then
if Is_Itype (Opnd_Type) then