ada: Fix ICE on Case_Expression a Pragma_Predicate

Before this patch, Case_Expression inside a Pragma_Predicate with a
non-static alternative (like a function call) led the Case_Expression
Node to survive unexpanded and caused gnat_to_gnu to abort
(gcc_unreachable for N_Case_Expression).

The guard in Expand_N_Case_Expression checking for non-static
Predicate_Aspect used Has_Dynamic_Predicate_Aspect, which was false
even with a function call in a Case_Expression alternative.

Now add Is_Predicate_Static to the check, which fixes the bug.
This function was private to the sem_ch13 package, so it was made public.

gcc/ada/ChangeLog:

	* sem_ch13.ads (Is_Predicate_Static): Public declaration,
	from the private function in the package body
	* sem_ch13.adb (Is_Predicate_Static): Remove the now-redundant
	local declaration
	* exp_ch4.adb (Expand_N_Case_Expression): Add Is_Predicate_Static
	to the static guard
3 files changed