From b6f918d5f22433cf7d036871c4828a1e0585cf6a Mon Sep 17 00:00:00 2001 From: Tristan Gingold <tgingold@free.fr> Date: Tue, 27 Sep 2022 19:15:42 +0200 Subject: synth: handle error on variable default value --- src/synth/synth-vhdl_decls.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/synth') diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb index f9618462e..eb1d37e2f 100644 --- a/src/synth/synth-vhdl_decls.adb +++ b/src/synth/synth-vhdl_decls.adb @@ -463,6 +463,11 @@ package body Synth.Vhdl_Decls is Init := Synth_Expression_With_Type (Syn_Inst, Def, Obj_Typ); Init := Synth_Subtype_Conversion (Syn_Inst, Init, Obj_Typ, True, Decl); + if Init = No_Valtyp then + Set_Error (Syn_Inst); + Release_Expr_Pool (Marker); + return; + end if; if not Is_Subprg and then not Is_Static (Init.Val) then -- cgit v1.2.3