When retrieving entities of subprogram spec we only handled functions
and procedures, but not entries. This had no consequences, because we
then only applied checks to functions, but still is worth a cleanup, so
the code is easier to adapt for access-to-subprogram entities as well.
gcc/ada/
* sem_util.adb (Check_Result_And_Post_State): Properly handle entry
bodies.
then
Spec_Id := Corresponding_Spec_Of_Stub (Subp_Decl);
+ elsif Nkind (Subp_Decl) = N_Entry_Body then
+ Spec_Id := Corresponding_Spec (Subp_Decl);
+
else
Spec_Id := Subp_Id;
end if;