aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/vhdl-canon.adb3
-rw-r--r--src/vhdl/vhdl-evaluation.adb4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb
index 2a8ef8aa0..67d91478d 100644
--- a/src/vhdl/vhdl-canon.adb
+++ b/src/vhdl/vhdl-canon.adb
@@ -116,6 +116,9 @@ package body Vhdl.Canon is
end if;
case Get_Kind (Expr) is
+ when Iir_Kind_Overflow_Literal =>
+ null;
+
when Iir_Kind_Slice_Name =>
if not Is_Target and then
Get_Name_Staticness (Expr) >= Globally
diff --git a/src/vhdl/vhdl-evaluation.adb b/src/vhdl/vhdl-evaluation.adb
index 0cf803f97..653cbdb31 100644
--- a/src/vhdl/vhdl-evaluation.adb
+++ b/src/vhdl/vhdl-evaluation.adb
@@ -228,7 +228,9 @@ package body Vhdl.Evaluation is
Location_Copy (Res, Origin);
Set_Type (Res, Expr_Type);
Set_Literal_Origin (Res, Origin);
- Set_Expr_Staticness (Res, Locally);
+ -- Expression is not static so that it will be an error if it needs
+ -- to. Otherwise, the error will occur at runtime.
+ Set_Expr_Staticness (Res, None);
return Res;
end Build_Overflow;