From 94372ab4200671b230fbc1d3386c5e206bda62d9 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 30 Jan 2023 19:34:36 +0100 Subject: synth: also fix crash for #2333 --- src/synth/elab-vhdl_insts.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index 1c800b8b4..283265dba 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -313,20 +313,21 @@ package body Elab.Vhdl_Insts is and then not Get_Elab_Flag (Dep) then Set_Elab_Flag (Dep, True); - Elab_Dependencies (Parent_Inst, Dep); Dep_Unit := Get_Library_Unit (Dep); case Iir_Kinds_Library_Unit (Get_Kind (Dep_Unit)) is when Iir_Kind_Entity_Declaration => null; when Iir_Kind_Configuration_Declaration => + Elab_Dependencies (Parent_Inst, Dep); Elab_Configuration_Declaration (Parent_Inst, Dep_Unit); when Iir_Kind_Context_Declaration => - null; + Elab_Dependencies (Parent_Inst, Dep); when Iir_Kind_Package_Declaration => declare Bod : constant Node := Get_Package_Body (Dep_Unit); Bod_Unit : Node; begin + Elab_Dependencies (Parent_Inst, Dep); Elab_Package_Declaration (Parent_Inst, Dep_Unit); -- Do not try to elaborate math_real body: there are -- functions with loop. Currently, try create signals, @@ -338,6 +339,7 @@ package body Elab.Vhdl_Insts is end if; end; when Iir_Kind_Package_Instantiation_Declaration => + Elab_Dependencies (Parent_Inst, Dep); Elab_Package_Instantiation (Parent_Inst, Dep_Unit); when Iir_Kind_Package_Body => null; -- cgit v1.2.3