summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch9.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-25 15:59:05 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-25 15:59:05 +0000
commit632a89954bc74fcf3cbc4cd34d04da14093ea3a8 (patch)
tree55546168634e1653e8e637a0b8c0f34c3ccdada9 /gcc/ada/exp_ch9.adb
parentfd11b6022fadd0ed9993f7bd3a8c8858f2be1ddd (diff)
downloadgcc-632a89954bc74fcf3cbc4cd34d04da14093ea3a8.tar.gz
2004-02-25 Robert Dewar <dewar@gnat.com>
* 51osinte.ads, 52osinte.ads, 53osinte.ads, 54osinte.ads, 55osinte.ads, 56osinte.ads, 5aosinte.ads, 5bosinte.ads, 5cosinte.ads, 5fosinte.ads, 5gosinte.ads, 5hosinte.ads, 5iosinte.ads, 5losinte.ads, 5nosinte.ads, 5oosinte.ads, 5posinte.ads, 5sosinte.ads, 5tosinte.ads, 5vosinte.ads, 5wosinte.ads, 5zosinte.ads: Move instances of Unchecked_Conversion to the defining instance of the type to avoid aliasing problems. Fix copyright header. Fix bad comments in package header. * exp_util.adb, prj-part.adb, prj-part.adb: Minor reformatting 2004-02-25 Ed Schonberg <schonberg@gnat.com> * exp_ch2.adb (Param_Entity): Handle properly formals that have been rewritten as references when aliased through an address clause. * sem_ch4.adb (Try_Indirect_Call): Normalize actuals before checking whether call can be interpreted as an indirect call to the result of a parameterless function call returning an access subprogram. 2004-02-25 Arnaud Charlet <charlet@act-europe.fr> Code clean up: * exp_ch7.adb (Make_Clean): Remove generation of calls to Unlock[_Entries], since this is now done by Service_Entries directly. * exp_ch9.adb (Build_Protected_Subprogram_Body): ditto. * s-tpobop.ads, s-tpobop.adb (PO_Service_Entries): New nested procedure Requeue_Call for better code readability. Change spec and update calls: PO_Service_Entries now unlock the PO on exit. (Protected_Entry_Call, Timed_Protected_Entry_Call): Update calls to PO_Service_Entries. * s-tposen.ads, s-tposen.adb (Service_Entry): Now unlock the PO on exit. * s-taenca.adb, s-tasren.adb: Update calls to PO_Service_Entries. 2004-02-25 Sergey Rybin <rybin@act-europe.fr> * exp_ch9.adb (Build_Simple_Entry_Call): Prevent expanding the protected subprogram call and analyzing the result of such expanding in case when the called protected subprogram is eliminated. * sem_elim.adb (Check_Eliminated): Skip blocks when comparing scope names. 2004-02-25 Jerome Guitton <guitton@act-europe.fr> * Makefile.in: Clean ups. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78436 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r--gcc/ada/exp_ch9.adb35
1 files changed, 12 insertions, 23 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index ddaf2aa13e8..62ed2af0c5d 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -1553,10 +1553,7 @@ package body Exp_Ch9 is
Sub_Body : Node_Id;
Lock_Name : Node_Id;
Lock_Stmt : Node_Id;
- Unlock_Name : Node_Id;
- Unlock_Stmt : Node_Id;
Service_Name : Node_Id;
- Service_Stmt : Node_Id;
R : Node_Id;
Return_Stmt : Node_Id := Empty; -- init to avoid gcc 3 warning
Pre_Stmts : List_Id := No_List; -- init to avoid gcc 3 warning
@@ -1740,19 +1737,16 @@ package body Exp_Ch9 is
or else Number_Entries (Pid) > 1
then
Lock_Name := New_Reference_To (RTE (RE_Lock_Entries), Loc);
- Unlock_Name := New_Reference_To (RTE (RE_Unlock_Entries), Loc);
Service_Name := New_Reference_To (RTE (RE_Service_Entries), Loc);
else
Lock_Name := New_Reference_To (RTE (RE_Lock_Entry), Loc);
- Unlock_Name := New_Reference_To (RTE (RE_Unlock_Entry), Loc);
Service_Name := New_Reference_To (RTE (RE_Service_Entry), Loc);
end if;
else
Lock_Name := New_Reference_To (RTE (RE_Lock), Loc);
- Unlock_Name := New_Reference_To (RTE (RE_Unlock), Loc);
- Service_Name := Empty;
+ Service_Name := New_Reference_To (RTE (RE_Unlock), Loc);
end if;
Object_Parm :=
@@ -1790,20 +1784,12 @@ package body Exp_Ch9 is
Append (Unprot_Call, Stmts);
end if;
- if Service_Name /= Empty then
- Service_Stmt := Make_Procedure_Call_Statement (Loc,
- Name => Service_Name,
- Parameter_Associations =>
- New_List (New_Copy_Tree (Object_Parm)));
- Append (Service_Stmt, Stmts);
- end if;
-
- Unlock_Stmt :=
+ Append (
Make_Procedure_Call_Statement (Loc,
- Name => Unlock_Name,
- Parameter_Associations => New_List (
- New_Copy_Tree (Object_Parm)));
- Append (Unlock_Stmt, Stmts);
+ Name => Service_Name,
+ Parameter_Associations =>
+ New_List (New_Copy_Tree (Object_Parm))),
+ Stmts);
if Abort_Allowed then
Append (
@@ -2040,9 +2026,12 @@ package body Exp_Ch9 is
if Is_Protected_Type (Conctyp)
and then Is_Subprogram (Entity (Ename))
then
- Build_Protected_Subprogram_Call
- (N, Ename, Convert_Concurrent (Concval, Conctyp));
- Analyze (N);
+ if not Is_Eliminated (Entity (Ename)) then
+ Build_Protected_Subprogram_Call
+ (N, Ename, Convert_Concurrent (Concval, Conctyp));
+ Analyze (N);
+ end if;
+
return;
end if;