From 018fd9bba13a3d31490cda71293297fd17fafe1c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 27 Mar 2023 19:37:06 +0200 Subject: vhdl-evaluation: free temporary node --- src/vhdl/vhdl-evaluation.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3