diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-11-24 07:26:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-11-24 07:26:51 +0100 |
commit | d4708cc345e3c0a11c33e1ec197285229d1fd113 (patch) | |
tree | 5dc7450fa268a34e83b262e5b54a91e9b185e07c /src/grt | |
parent | 1474383160069468694f2e64920ce968a80d58ab (diff) | |
download | ghdl-d4708cc345e3c0a11c33e1ec197285229d1fd113.tar.gz ghdl-d4708cc345e3c0a11c33e1ec197285229d1fd113.tar.bz2 ghdl-d4708cc345e3c0a11c33e1ec197285229d1fd113.zip |
trans-rtis: take into account instances in the count of packages.
rtis: check number of packages.
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/grt-rtis.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/grt/grt-rtis.adb b/src/grt/grt-rtis.adb index 26d976459..7f4a00ff7 100644 --- a/src/grt/grt-rtis.adb +++ b/src/grt/grt-rtis.adb @@ -24,8 +24,11 @@ -- covered by the GNU Public License. package body Grt.Rtis is + Max_Top_Pkg : Ghdl_Index_Type := 0; + procedure Ghdl_Rti_Add_Package (Pkg : Ghdl_Rti_Access) is begin + pragma Assert (Ghdl_Rti_Top.Nbr_Child < Max_Top_Pkg); Ghdl_Rti_Top.Children (Ghdl_Rti_Top.Nbr_Child) := Pkg; Ghdl_Rti_Top.Nbr_Child := Ghdl_Rti_Top.Nbr_Child + 1; end Ghdl_Rti_Add_Package; @@ -33,10 +36,10 @@ package body Grt.Rtis is procedure Ghdl_Rti_Add_Top (Max_Pkg : Ghdl_Index_Type; Pkgs : Ghdl_Rti_Arr_Acc; Top : Ghdl_Rti_Access; - Instance : Address) - is - pragma Unreferenced (Max_Pkg); + Instance : Address) is begin + Max_Top_Pkg := Max_Pkg; + Ghdl_Rti_Top.Parent := Top; Ghdl_Rti_Top.Children := Pkgs; Ghdl_Rti_Top_Instance := Instance; |