Posting the error message on the declaration of the renamed subprogram
is more confusing than posting the message on the name of the renamed
subprogram in the renaming.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Check_Abstract_Overriding): Post error message on
renaming node.
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -11156,7 +11156,8 @@ package body Sem_Ch3 is
if Present (Renamed_Or_Alias (Subp)) then
if not No_Return (Renamed_Or_Alias (Subp)) then
- Error_Msg_N ("subprogram & must be No_Return",
+ Error_Msg_NE ("subprogram & must be No_Return",
+ Subp,
Renamed_Or_Alias (Subp));
Error_Msg_N ("\since renaming & overrides No_Return "
& "subprogram (RM 6.5.1(6/2))",