[Ada] Implement AI12-0290 (Simple_Barriers restriction)
2020-06-08 Steve Baird <baird@adacore.com>
gcc/ada/
* sem_ch13.ads: Export new function
All_Membership_Choices_Static.
* sem_ch13.adb: Implement new function
All_Membership_Choices_Static. This involves moving the
functions Is_Static_Choice and All_Membership_Choices_Static,
which were previously declared within the function
Is_Predicate_Static, out to library level so that they can be
called by the new function. The already-exisiting code in
Is_Predicate_Static which became the body of
All_Membership_Choices_Static is replaced with a call to the new
function in order to avoid duplication.
* exp_ch9.adb (Is_Pure_Barrier): Several changes needed to
implement rules of AI12-0290 and RM D.7's definition of
"pure-barrier-eligible". These changes include adding a call to
the new function Sem_13.All_Membership_Choices_Static, as per
the "see 4.9" in RM D.7(1.6/5).