summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 2b958a839c9..cce3e09c7c8 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -2095,8 +2095,22 @@ package body Sem_Ch4 is
then
Error_Msg_NE
(" =='> in call to &#(inherited)!", Actual, Nam);
+
+ elsif Ekind (Nam) = E_Subprogram_Type then
+ declare
+ Access_To_Subprogram_Typ :
+ constant Entity_Id :=
+ Defining_Identifier
+ (Associated_Node_For_Itype (Nam));
+ begin
+ Error_Msg_NE (
+ " =='> in call to dereference of &#!",
+ Actual, Access_To_Subprogram_Typ);
+ end;
+
else
Error_Msg_NE (" =='> in call to &#!", Actual, Nam);
+
end if;
end if;
end if;