summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 97f98380c2b..9799860cf13 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -7076,7 +7076,9 @@ package body Sem_Res is
end if;
end;
- elsif Ekind (Target_Type) = E_Access_Subprogram_Type
+ elsif (Ekind (Target_Type) = E_Access_Subprogram_Type
+ or else
+ Ekind (Target_Type) = E_Anonymous_Access_Subprogram_Type)
and then Conversion_Check
(Ekind (Base_Type (Opnd_Type)) = E_Access_Subprogram_Type,
"illegal operand for access subprogram conversion")