diff options
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index e08370e..387e06f 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -5460,7 +5460,13 @@ package body Sem_Res is ("cannot disambiguate function call and indexing", N); else New_Subp := Relocate_Node (Subp); - Set_Entity (Subp, Nam); + + -- The called entity may be an explicit dereference, in which + -- case there is no entity to set. + + if Nkind (New_Subp) /= N_Explicit_Dereference then + Set_Entity (Subp, Nam); + end if; if (Is_Array_Type (Ret_Type) and then Component_Type (Ret_Type) /= Any_Type) |