From 6476fc372a684ff42712c10508dddf0e6d229df5 Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Fri, 14 Feb 2020 16:24:47 -0800 Subject: [Ada] Implement AI12-0290 (Simple_Barriers restriction) 2020-06-08 Steve Baird 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). --- gcc/ada/sem_ch13.ads | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/ada/sem_ch13.ads') diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads index 9a922ea..4c26473 100644 --- a/gcc/ada/sem_ch13.ads +++ b/gcc/ada/sem_ch13.ads @@ -28,6 +28,9 @@ with Types; use Types; with Uintp; use Uintp; package Sem_Ch13 is + function All_Membership_Choices_Static (Expr : Node_Id) return Boolean; + -- Given a membership test, returns True iff all choices are static. + procedure Analyze_At_Clause (N : Node_Id); procedure Analyze_Attribute_Definition_Clause (N : Node_Id); procedure Analyze_Enumeration_Representation_Clause (N : Node_Id); -- cgit v1.1