diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-15 14:09:35 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-15 14:09:35 +0200 |
commit | 991395ab4fdc4f912b37616c6ed3e51efa4a831e (patch) | |
tree | f283f72c27bacac58c6a01f656294c7d8e83a5d6 /gcc/ada/sem_disp.adb | |
parent | 55cc1a0524a460e8b224878114842463100b0e0e (diff) | |
download | gcc-991395ab4fdc4f912b37616c6ed3e51efa4a831e.zip gcc-991395ab4fdc4f912b37616c6ed3e51efa4a831e.tar.gz gcc-991395ab4fdc4f912b37616c6ed3e51efa4a831e.tar.bz2 |
[multiple changes]
2009-04-15 Pascal Obry <obry@adacore.com>
* adaint.h (__gnat_unlink): Add spec.
(__gnat_rename): Likewise.
2009-04-15 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb: Minor spelling error corrections in error messages
2009-04-15 Robert Dewar <dewar@adacore.com>
* sinfo.ads: Minor comment update
* opt.ads: Minor comment updates
* checks.adb (Enable_Overflow_Check): Do not set Do_Overflow_Check for
modular type.
2009-04-15 Ed Schonberg <schonberg@adacore.com>
* exp_disp.ads, exp_disp.adb (Register_Primitive): Is now a function
that generates the code needed to update a dispatch table when a
primitive operation is declared with a subprogram body without previous
spec. Insertion of the generated code is responsibility of the caller.
(Make_DT): When building static tables, append the code created by
Register_Primitive to update a secondary table after it has been
constructed.
* exp_ch3.adb, exp_ch6.adb: use new version of Register_Primitive.
* sem_disp.adb (Check_Dispatching_Operation): Call Register_Primitive
on an overriding operation that implements an interface operation only
if not building static dispatch tables.
2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
* a-caldel-vms.adb (To_Duration): Declare a "safe" end of time which
does not cause overflow when converted to Duration. Use the safe value
as the maximum allowable time delay..
2009-04-15 Jerome Lambourg <lambourg@adacore.com>
* g-comlin.adb (Set_Command_Line): When adding a switch with attached
parameter, specify that the delimiter is NUL, otherwise "-j2" will be
translated to "-j 2".
2009-04-15 Bob Duff <duff@adacore.com>
* rtsfind.adb (Maybe_Add_With): Split out procedure to add implicit
with_clauses, to avoid code duplication. Change this processing so we
always add a with_clause on the main unit if needed.
From-SVN: r146102
Diffstat (limited to 'gcc/ada/sem_disp.adb')
-rw-r--r-- | gcc/ada/sem_disp.adb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index 96e6bc1..fc3db82 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -28,6 +28,7 @@ with Debug; use Debug; with Elists; use Elists; with Einfo; use Einfo; with Exp_Disp; use Exp_Disp; +with Exp_Util; use Exp_Util; with Exp_Ch7; use Exp_Ch7; with Exp_Tss; use Exp_Tss; with Errout; use Errout; @@ -835,9 +836,9 @@ package body Sem_Disp is end if; else - Register_Primitive (Sloc (Subp_Body), - Prim => Subp, - Ins_Nod => Subp_Body); + Insert_Actions_After (Subp_Body, + Register_Primitive (Sloc (Subp_Body), + Prim => Subp)); end if; Generate_Reference (Tagged_Type, Subp, 'p', False); @@ -909,7 +910,9 @@ package body Sem_Disp is -- Ada 2005 (AI-251): In case of late overriding of a primitive -- that covers abstract interface subprograms we must register it -- in all the secondary dispatch tables associated with abstract - -- interfaces. + -- interfaces. We do this now only if not building static tables. + -- Otherwise the patch code is emitted after those tables are + -- built, to prevent access_before_elaboration in gigi. if Body_Is_Last_Primitive then declare @@ -925,10 +928,10 @@ package body Sem_Disp is if Present (Alias (Prim)) and then Present (Interface_Alias (Prim)) and then Alias (Prim) = Subp + and then not Building_Static_DT (Tagged_Type) then - Register_Primitive (Sloc (Prim), - Prim => Prim, - Ins_Nod => Subp_Body); + Insert_Actions_After (Subp_Body, + Register_Primitive (Sloc (Subp_Body), Prim => Prim)); end if; Next_Elmt (Elmt); |