summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 1717aec7afc..1845e80916c 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -9725,11 +9725,12 @@ package body Sem_Ch3 is
New_T := Any_Type;
end if;
- -- If previous full declaration exists, or if a homograph is present,
- -- let Enter_Name handle it, either with an error, or with the removal
- -- of an overridden implicit subprogram.
+ -- If previous full declaration or a renaming declaration exists, or if
+ -- a homograph is present, let Enter_Name handle it, either with an
+ -- error or with the removal of an overridden implicit subprogram.
if Ekind (Prev) /= E_Constant
+ or else Nkind (Parent (Prev)) = N_Object_Renaming_Declaration
or else Present (Expression (Parent (Prev)))
or else Present (Full_View (Prev))
then