aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-28 10:14:11 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-28 10:14:11 +0100
commit110fccbca3326257be35caf1c89d2571df2db1a2 (patch)
tree93b5fffee289f18c10c5649bc9455236a6be523a
parent11a11db1c57eb1c7be6f0606a9671cda4a6f71ff (diff)
downloadghdl-110fccbca3326257be35caf1c89d2571df2db1a2.tar.gz
ghdl-110fccbca3326257be35caf1c89d2571df2db1a2.tar.bz2
ghdl-110fccbca3326257be35caf1c89d2571df2db1a2.zip
vhdl: minor changes to avoid recomputation
-rw-r--r--src/vhdl/vhdl-sem_expr.adb1
-rw-r--r--src/vhdl/vhdl-sem_types.adb1
2 files changed, 1 insertions, 1 deletions
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;