diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-21 13:35:58 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-21 13:35:58 +0000 |
commit | 3cb12758d32dff65b6f7390442c88f946f153a24 (patch) | |
tree | 785d0e17bdbe412c5fe6f2c81b39566c3706c168 /gcc/ada/sem_util.ads | |
parent | 70be2d3a9f73df3633c6f38c7c5e6749542c5c68 (diff) | |
download | gcc-3cb12758d32dff65b6f7390442c88f946f153a24.tar.gz |
2010-06-21 Thomas Quinot <quinot@adacore.com>
* sem_ch9.adb, checks.adb, sem_util.adb, sem_util.ads, sem_res.adb,
sem_attr.adb (Get_E_First_Or_Last): Use attribute references on E to
extract bounds, to ensure that we get the proper captured values,
rather than an expression that may have changed value since the point
where the subtype was elaborated.
(Find_Body_Discriminal): New utility subprogram to share code between...
(Eval_Attribute): For the case of a subtype bound that references a
discriminant of the current concurrent type, insert appropriate
discriminal reference.
(Resolve_Entry.Actual_Index_Type.Actual_Discriminant_Ref): For a
requeue to an entry in a family in the current task, use corresponding
body discriminal.
(Analyze_Accept_Statement): Rely on expansion of attribute references
to insert proper discriminal references in range check for entry in
family.
2010-06-21 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb (Compile): Fix handling of big patterns.
2010-06-21 Robert Dewar <dewar@adacore.com>
* a-tifiio.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 806cbcf8c87..2d786a4d94c 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -329,11 +329,11 @@ package Sem_Util is function Find_Corresponding_Discriminant (Id : Node_Id; Typ : Entity_Id) return Entity_Id; - -- Because discriminants may have different names in a generic unit - -- and in an instance, they are resolved positionally when possible. - -- A reference to a discriminant carries the discriminant that it - -- denotes when analyzed. Subsequent uses of this id on a different - -- type denote the discriminant at the same position in this new type. + -- Because discriminants may have different names in a generic unit and in + -- an instance, they are resolved positionally when possible. A reference + -- to a discriminant carries the discriminant that it denotes when + -- analyzed. Subsequent uses of this id on a different type denotes the + -- discriminant at the same position in this new type. procedure Find_Overlaid_Entity (N : Node_Id; @@ -355,6 +355,12 @@ package Sem_Util is -- Determine the alternative chosen, so that the code of non-selected -- alternatives, and the warnings that may apply to them, are removed. + function Find_Body_Discriminal + (Spec_Discriminant : Entity_Id) return Entity_Id; + -- Given a discriminant of the record type that implements a task or + -- protected type, return the discriminal of the corresponding discriminant + -- of the actual concurrent type. + function First_Actual (Node : Node_Id) return Node_Id; -- Node is an N_Function_Call or N_Procedure_Call_Statement node. The -- result returned is the first actual parameter in declaration order |