From c31919740777ff7f843d3f197586d15f16145a53 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 19 Dec 2021 18:06:11 +0100 Subject: ghdldrv: fix crash due to double initialization --- src/ghdldrv/ghdlsynth.adb | 3 +++ src/synth/elab-vhdl_insts.adb | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index ced5b71c9..7402925a2 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -49,6 +49,7 @@ with Netlists.Inference; with Elab.Vhdl_Context; use Elab.Vhdl_Context; with Elab.Vhdl_Insts; +with Elab.Vhdl_Objtypes; with Synthesis; with Synth.Disp_Vhdl; @@ -287,6 +288,8 @@ package body Ghdlsynth is -- association. They are handled directly. Vhdl.Canon.Canon_Flag_Inertial_Associations := False; + Elab.Vhdl_Objtypes.Init; + if Ghdlcomp.Init_Verilog_Options /= null then Ghdlcomp.Init_Verilog_Options.all (False); end if; diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index b8b53517d..ac955db0e 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -727,8 +727,6 @@ package body Elab.Vhdl_Insts is Vhdl.Annotations.Annotate (Design_Units.Table (I)); end loop; - Elab.Vhdl_Objtypes.Init; - -- Start elaboration. Make_Root_Instance; -- cgit v1.2.3