ada: Fix assertion failure on private limited with clause
This checks that the name is of an entity before accessing its Entity field. gcc/ada/ * sem_ch8.adb (Has_Private_With): Add test on Is_Entity_Name.
This commit is contained in:
parent
d506247921
commit
cdd5dd2125
1 changed files with 1 additions and 0 deletions
|
@ -8980,6 +8980,7 @@ package body Sem_Ch8 is
|
|||
while Present (Item) loop
|
||||
if Nkind (Item) = N_With_Clause
|
||||
and then Private_Present (Item)
|
||||
and then Is_Entity_Name (Name (Item))
|
||||
and then Entity (Name (Item)) = E
|
||||
then
|
||||
return True;
|
||||
|
|
Loading…
Add table
Reference in a new issue