diff options
author | Steve Baird <baird@adacore.com> | 2020-02-14 16:24:47 -0800 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-08 03:51:07 -0400 |
commit | 6476fc372a684ff42712c10508dddf0e6d229df5 (patch) | |
tree | c03154d0536dcfe53870ee938f65f69d956bcfba /gcc/ada/sem_ch13.ads | |
parent | 8b0ec65d852c11fde3937629d10c6b24083b5737 (diff) | |
download | gcc-6476fc372a684ff42712c10508dddf0e6d229df5.zip gcc-6476fc372a684ff42712c10508dddf0e6d229df5.tar.gz gcc-6476fc372a684ff42712c10508dddf0e6d229df5.tar.bz2 |
[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).
Diffstat (limited to 'gcc/ada/sem_ch13.ads')
-rw-r--r-- | gcc/ada/sem_ch13.ads | 3 |
1 files changed, 3 insertions, 0 deletions
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); |