When examining expression of the first declaration of the inlined body
make sure that this declaration is in fact an object declaration.
gcc/ada/
* inline.adb (Has_Single_Return): Add guard for the subsequent
call to Expression.
return
Present (Declarations (N))
and then Present (First (Declarations (N)))
+ and then Nkind (First (Declarations (N))) = N_Object_Declaration
and then Entity (Expression (Return_Statement)) =
Defining_Identifier (First (Declarations (N)));
end if;