diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-03-27 19:37:06 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-03-27 19:37:06 +0200 |
commit | 018fd9bba13a3d31490cda71293297fd17fafe1c (patch) | |
tree | dad6ba5f76de6e1ebf7f3adc80db8ad682512ff8 | |
parent | 6adaf715af9ac09f706b627024e21087b328a71d (diff) | |
download | ghdl-018fd9bba13a3d31490cda71293297fd17fafe1c.tar.gz ghdl-018fd9bba13a3d31490cda71293297fd17fafe1c.tar.bz2 ghdl-018fd9bba13a3d31490cda71293297fd17fafe1c.zip |
vhdl-evaluation: free temporary node
-rw-r--r-- | src/vhdl/vhdl-evaluation.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-evaluation.adb b/src/vhdl/vhdl-evaluation.adb index e20952634..53c82abf9 100644 --- a/src/vhdl/vhdl-evaluation.adb +++ b/src/vhdl/vhdl-evaluation.adb @@ -3279,15 +3279,16 @@ package body Vhdl.Evaluation is is Selected_El : constant Iir := Get_Named_Entity (Expr); El_Pos : constant Iir_Index32 := Get_Element_Position (Selected_El); + Expr_Prefix : constant Iir := Get_Prefix (Expr); Prefix : Iir; Cur_Pos : Iir_Index32; Assoc : Iir; Assoc_Expr : Iir; Res : Iir; begin - Prefix := Get_Prefix (Expr); - Prefix := Eval_Static_Expr (Prefix); + Prefix := Eval_Static_Expr (Expr_Prefix); if Is_Overflow_Literal (Prefix) then + Free_Eval_Static_Expr (Prefix, Expr_Prefix); return Build_Overflow (Expr, Get_Type (Expr)); end if; |