gcc/ada/
* sem_prag.adb: Fix typos in comments related to access types.
* sem_util.adb (Is_Access_Variable): Stronger condition.
if Global_Mode in Name_In_Out | Name_Output then
- -- Constant of a access-to-variable type is a read-write
+ -- Constant of an access-to-variable type is a read-write
-- item in procedures, generic procedures, protected
-- entries and tasks.
Arg1);
end if;
- -- Only other possibility is Access-to-class-wide type
+ -- Only other possibility is access-to-class-wide type
elsif Is_Access_Type (Nm)
and then Is_Class_Wide_Type (Designated_Type (Nm))
function Is_Access_Variable (E : Entity_Id) return Boolean is
begin
- return Is_Access_Object_Type (E)
- and then not Is_Access_Constant (E);
+ return Is_Access_Type (E)
+ and then not Is_Access_Constant (E)
+ and then Ekind (Directly_Designated_Type (E)) /= E_Subprogram_Type;
end Is_Access_Variable;
-----------------------------