gcc/ada/
* exp_ch6.adb (Make_Build_In_Place_Iface_Call_In_Allocator):
Build the internal anonymous access type using as a reference
the designated type imposed by the context (instead of using the
return type of the called function).
-- declaration.
Anon_Type := Create_Itype (E_Anonymous_Access_Type, Function_Call);
- Set_Directly_Designated_Type (Anon_Type, Etype (BIP_Func_Call));
+ Set_Directly_Designated_Type (Anon_Type,
+ Designated_Type (Etype (Allocator)));
Set_Etype (Anon_Type, Anon_Type);
Build_Class_Wide_Master (Anon_Type);