From 110fccbca3326257be35caf1c89d2571df2db1a2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 28 Jan 2023 10:14:11 +0100 Subject: vhdl: minor changes to avoid recomputation --- src/vhdl/vhdl-sem_expr.adb | 1 + src/vhdl/vhdl-sem_types.adb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index 2a27dba05..94d0908f4 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -2985,6 +2985,7 @@ package body Vhdl.Sem_Expr is return Replace_By_Range_Choice (Expr, Ent); when Iir_Kind_Subtype_Declaration | Iir_Kind_Type_Declaration => + Set_Type (Expr, Get_Type (Ent)); Ent := Is_Type_Name (Expr); Set_Expr_Staticness (Expr, Get_Type_Staticness (Ent)); return Replace_By_Range_Choice (Expr, Ent); diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index 3481fb46c..02ffcc44e 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -2296,7 +2296,6 @@ package body Vhdl.Sem_Types is A_Range := Get_Range_Constraint (Type_Mark); Set_Is_Ref (Res, True); elsif Get_Expr_Staticness (A_Range) = Locally then - A_Range := Eval_Range (A_Range); Check_Range_Compatibility (A_Range, Get_Range_Constraint (Type_Mark)); end if; -- cgit v1.2.3