[Ada] Don't expect enumeration literals to be renamings

gcc/ada/

	* lib-xref.adb (Get_Through_Renamings): Exit loop when an
	enumeration literal is found.
This commit is contained in:
Piotr Trojanek 2021-10-20 09:46:38 +02:00 committed by Pierre-Marie de Rodat
parent c652a33260
commit f977a79272

View file

@ -481,7 +481,9 @@ package body Lib.Xref is
-- e.g. function call, slicing of a function call,
-- pointer dereference, etc.
if No (Obj) then
if No (Obj)
or else Ekind (Obj) = E_Enumeration_Literal
then
return Empty;
end if;
else