diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-09-18 08:46:04 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-09-18 08:46:04 +0200 |
commit | 712c08710de22ecbcbf42527ef516160591a1000 (patch) | |
tree | f4c5c93ffe7f5bb245210877e3601591d375da72 | |
parent | b3b31cc9b74b3f1bc07b15ada32ba2925eb490df (diff) | |
download | ghdl-712c08710de22ecbcbf42527ef516160591a1000.tar.gz ghdl-712c08710de22ecbcbf42527ef516160591a1000.tar.bz2 ghdl-712c08710de22ecbcbf42527ef516160591a1000.zip |
synth: fix assert failure on attribute specification
-rw-r--r-- | src/synth/synth-vhdl_decls.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb index ca1414c84..7bccf96cf 100644 --- a/src/synth/synth-vhdl_decls.adb +++ b/src/synth/synth-vhdl_decls.adb @@ -271,10 +271,12 @@ package body Synth.Vhdl_Decls is is Attr_Decl : constant Node := Get_Named_Entity (Get_Attribute_Designator (Spec)); + Marker : Mark_Type; Value : Node; Val : Valtyp; Val_Type : Type_Acc; begin + Mark_Expr_Pool (Marker); Val_Type := Get_Subtype_Object (Syn_Inst, Get_Type (Attr_Decl)); Value := Get_Attribute_Value_Spec_Chain (Spec); while Value /= Null_Iir loop @@ -295,8 +297,10 @@ package body Synth.Vhdl_Decls is -- -- 4. Each new attribute instance is assigned the value of -- the expression. + Val := Unshare (Val, Instance_Pool); Create_Object (Syn_Inst, Value, Val); - -- Unshare (Val, Instance_Pool); + + Release_Expr_Pool (Marker); Value := Get_Spec_Chain (Value); end loop; |