summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r--gcc/ada/lib-xref.adb25
1 files changed, 17 insertions, 8 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb
index 200ad6a5730..107c84951c2 100644
--- a/gcc/ada/lib-xref.adb
+++ b/gcc/ada/lib-xref.adb
@@ -1147,16 +1147,25 @@ package body Lib.Xref is
-- Special handling for access parameter
- if Ekind (Etype (XE.Ent)) = E_Anonymous_Access_Type
- and then Is_Formal (XE.Ent)
- then
- Ctyp := 'p';
+ declare
+ K : constant Entity_Kind := Ekind (Etype (XE.Ent));
+
+ begin
+ if (K = E_Anonymous_Access_Type
+ or else
+ K = E_Anonymous_Access_Subprogram_Type
+ or else K =
+ E_Anonymous_Access_Protected_Subprogram_Type)
+ and then Is_Formal (XE.Ent)
+ then
+ Ctyp := 'p';
- -- Special handling for Boolean
+ -- Special handling for Boolean
- elsif Ctyp = 'e' and then Is_Boolean_Type (Ent) then
- Ctyp := 'b';
- end if;
+ elsif Ctyp = 'e' and then Is_Boolean_Type (Ent) then
+ Ctyp := 'b';
+ end if;
+ end;
end if;
-- Special handling for abstract types and operations.