aboutsummaryrefslogtreecommitdiffstats
path: root/evaluation.adb
diff options
context:
space:
mode:
authorgingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2009-09-21 03:46:42 +0000
committergingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2009-09-21 03:46:42 +0000
commit9e9f8604f11d93894990e7733127d083abab8f3e (patch)
tree24e35d22157442340b7f52954f5133905b577456 /evaluation.adb
parent2dc407beb7dde9f0c986ee14e80f3ac43398e8bb (diff)
downloadghdl-9e9f8604f11d93894990e7733127d083abab8f3e.tar.gz
ghdl-9e9f8604f11d93894990e7733127d083abab8f3e.tar.bz2
ghdl-9e9f8604f11d93894990e7733127d083abab8f3e.zip
Version 0.28.
Diffstat (limited to 'evaluation.adb')
-rw-r--r--evaluation.adb15
1 files changed, 12 insertions, 3 deletions
diff --git a/evaluation.adb b/evaluation.adb
index 4742aeeb2..c54015385 100644
--- a/evaluation.adb
+++ b/evaluation.adb
@@ -868,7 +868,7 @@ package body Evaluation is
if Get_Kind (Left) = Iir_Kind_Error
or else Get_Kind (Right) = Iir_Kind_Error
then
- return Null_Iir;
+ return Create_Error_Expr (Orig, Get_Type (Orig));
end if;
Func := Get_Implicit_Definition (Get_Implementation (Orig));
@@ -1824,10 +1824,19 @@ package body Evaluation is
end if;
end Eval_Expr_If_Static;
- function Eval_Expr_Check_If_Static (Expr : Iir; Atype : Iir) return Iir is
+ function Eval_Expr_Check_If_Static (Expr : Iir; Atype : Iir) return Iir
+ is
+ Res : Iir;
begin
if Expr /= Null_Iir and then Get_Expr_Staticness (Expr) = Locally then
- return Eval_Expr_Check (Expr, Atype);
+ Res := Eval_Expr (Expr);
+ if Res /= Null_Iir
+ and then Get_Type_Staticness (Atype) = Locally
+ and then Get_Kind (Atype) in Iir_Kinds_Range_Type_Definition
+ then
+ Eval_Check_Bound (Res, Atype);
+ end if;
+ return Res;
else
return Expr;
end if;