From d7ce45a42f681d063373b75dd4fb5118e13de1c0 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 11 Jan 2023 05:14:03 +0100 Subject: synth: avoid a crash after error on signal association --- src/synth/elab-vhdl_insts.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index 8e93fed84..26763a5c6 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -429,7 +429,9 @@ package body Elab.Vhdl_Insts is end case; end if; - Res := Unshare (Res, Global_Pool'Access); + if Res /= null then + Res := Unshare (Res, Global_Pool'Access); + end if; Release_Expr_Pool (Marker); return Res; else @@ -454,7 +456,9 @@ package body Elab.Vhdl_Insts is if Get_Whole_Association_Flag (Assoc) then Inter_Typ := Elab_Port_Association_Type (Sub_Inst, Syn_Inst, Inter, Assoc); - Create_Signal (Sub_Inst, Inter, Inter_Typ); + if Inter_Typ /= null then + Create_Signal (Sub_Inst, Inter, Inter_Typ); + end if; end if; Next_Association_Interface (Assoc, Assoc_Inter); end loop; -- cgit v1.2.3