From 8a7988f51a78c05841fad17683cbb94b9dc33fd0 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 25 Feb 2004 16:59:05 +0100 Subject: [multiple changes] 2004-02-25 Robert Dewar * 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 * 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 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 * 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 * Makefile.in: Clean ups. From-SVN: r78436 --- gcc/ada/sem_elim.adb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc/ada/sem_elim.adb') diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb index 2a6ead4..8d38002 100644 --- a/gcc/ada/sem_elim.adb +++ b/gcc/ada/sem_elim.adb @@ -289,8 +289,15 @@ package body Sem_Elim is -- Then we need to see if the static scope matches within the -- compilation unit. + -- At the moment, gnatelim does not consider block statements as + -- scopes (even if a block is named) Scop := Scope (E); + + while Ekind (Scop) = E_Block loop + Scop := Scope (Scop); + end loop; + if Elmt.Entity_Scope /= null then for J in reverse Elmt.Entity_Scope'Range loop if Elmt.Entity_Scope (J) /= Original_Chars (Scop) then @@ -299,6 +306,10 @@ package body Sem_Elim is Scop := Scope (Scop); + while Ekind (Scop) = E_Block loop + Scop := Scope (Scop); + end loop; + if not Is_Compilation_Unit (Scop) and then J = 1 then goto Continue; end if; @@ -314,6 +325,10 @@ package body Sem_Elim is Scop := Scope (Scop); + while Ekind (Scop) = E_Block loop + Scop := Scope (Scop); + end loop; + if Scop /= Standard_Standard and then J = 1 then goto Continue; end if; -- cgit v1.1