aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;