diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-09-27 19:15:42 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-09-27 19:15:42 +0200 |
commit | b6f918d5f22433cf7d036871c4828a1e0585cf6a (patch) | |
tree | 600eaef0157d37162915be8adc49954c851b18c7 | |
parent | 83c5d5e66c405b4af6ee009912fba89f6c90d6d3 (diff) | |
download | ghdl-b6f918d5f22433cf7d036871c4828a1e0585cf6a.tar.gz ghdl-b6f918d5f22433cf7d036871c4828a1e0585cf6a.tar.bz2 ghdl-b6f918d5f22433cf7d036871c4828a1e0585cf6a.zip |
synth: handle error on variable default value
-rw-r--r-- | src/synth/synth-vhdl_decls.adb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |