aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 15:45:54 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 15:45:54 +0200
commit3fd9f17cdc0903732072cd64349ef14912d9cab0 (patch)
tree3b51fb074a158437e3e4914b43a1cd4e8b542a14 /gcc/ada/sem_res.adb
parent5e690fe3b1ac9825f08b7b90bb5e004d783ec270 (diff)
downloadgcc-3fd9f17cdc0903732072cd64349ef14912d9cab0.zip
gcc-3fd9f17cdc0903732072cd64349ef14912d9cab0.tar.gz
gcc-3fd9f17cdc0903732072cd64349ef14912d9cab0.tar.bz2
[multiple changes]
2010-10-18 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb: Minor reformatting. * gnat_ugn.texi, ug_words: Add missing entries, fix typos. 2010-10-18 Emmanuel Briot <briot@adacore.com> * g-comlin.adb (Is_In_Config): When the switch accepts either a space or equal, we output an equal every time. 2010-10-18 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Entry_Call): Handle call to an entry family member when pre/post conditions are present. * exp_ch9.adb (Build_PPC_Wrapper): The PPC_Wrapper for an entry family includes an index parameter, and the name of the enclosed entry call is an indexed component. From-SVN: r165634
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 0e67047..ab56c61 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -6336,13 +6336,20 @@ package body Sem_Res is
and then Current_Scope /= PPC_Wrapper (Nam)
then
-- Rewrite as call to the precondition wrapper, adding the task
- -- object to the list of actuals.
+ -- object to the list of actuals. If the call is to a member of
+ -- an entry family, include the index as well.
declare
New_Call : Node_Id;
New_Actuals : List_Id;
begin
New_Actuals := New_List (Obj);
+
+ if Nkind (Entry_Name) = N_Indexed_Component then
+ Append_To (New_Actuals,
+ New_Copy_Tree (First (Expressions (Entry_Name))));
+ end if;
+
Append_List (Parameter_Associations (N), New_Actuals);
New_Call :=
Make_Procedure_Call_Statement (Loc,