[Ada] Crash on renaming within declare expression

gcc/ada/

	* exp_dbug.adb (Debug_Renaming_Declaration): Add check for
	Entity present for Ren to prevent looking at unanalyzed nodes
This commit is contained in:
Justin Squirek 2021-08-12 08:54:15 -04:00 committed by Pierre-Marie de Rodat
parent 3323aa7ee7
commit 10ca293141

View file

@ -409,7 +409,9 @@ package body Exp_Dbug is
when N_Expanded_Name
| N_Identifier
=>
if not Present (Renamed_Object (Entity (Ren))) then
if No (Entity (Ren))
or else not Present (Renamed_Object (Entity (Ren)))
then
exit;
end if;