aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch8.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch8.adb')
-rw-r--r--gcc/ada/sem_ch8.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index fe93288..db892d0 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -8404,7 +8404,8 @@ package body Sem_Ch8 is
if Is_Overloaded (P) then
- -- The prefix must resolve to a unique enclosing construct
+ -- The prefix must resolve to a unique enclosing construct, per
+ -- the last sentence of RM 4.1.3 (13).
declare
Found : Boolean := False;
@@ -8418,6 +8419,7 @@ package body Sem_Ch8 is
if Found then
Error_Msg_N (
"prefix must be unique enclosing scope", N);
+ Change_Selected_Component_To_Expanded_Name (N);
Set_Entity (N, Any_Id);
Set_Etype (N, Any_Type);
return;