diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-09-11 16:50:10 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-09-11 16:50:10 +0200 |
commit | 20e3f9f61762661b5da31cb35971715635010057 (patch) | |
tree | 5d7cef439168074fa16884a93035b375aca3677b /src | |
parent | ae3e6932f7cecfce0dce4777644fc29040886651 (diff) | |
download | ghdl-20e3f9f61762661b5da31cb35971715635010057.tar.gz ghdl-20e3f9f61762661b5da31cb35971715635010057.tar.bz2 ghdl-20e3f9f61762661b5da31cb35971715635010057.zip |
synth-vhdl_stmts: fix crash on nested if-generate statement in vunits.
Fix #1859
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 25e37be8f..4e7c6963f 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -3554,6 +3554,7 @@ package body Synth.Vhdl_Stmts is Icond : Node; Cond : Valtyp; Name : Sname; + Config : Node; begin Gen := Stmt; Name := New_Sname_User (Get_Identifier (Stmt), Get_Sname (Syn_Inst)); @@ -3568,8 +3569,10 @@ package body Synth.Vhdl_Stmts is end if; if Cond = No_Valtyp or else Read_Discrete (Cond) = 1 then Bod := Get_Generate_Statement_Body (Gen); - Apply_Block_Configuration - (Get_Generate_Block_Configuration (Bod), Bod); + Config := Get_Generate_Block_Configuration (Bod); + if Config /= Null_Node then + Apply_Block_Configuration (Config, Bod); + end if; Synth_Generate_Statement_Body (Syn_Inst, Bod, Name); exit; end if; |