aboutsummaryrefslogtreecommitdiffstats
path: root/evaluation.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-01-04 01:48:22 +0100
committerTristan Gingold <tgingold@free.fr>2014-01-04 01:48:22 +0100
commitb1e062e701d5b225eed88691e95c747930482297 (patch)
tree2e6e73380ba38ff9e6c873466f303daf7850b842 /evaluation.adb
parent3303c1924bae3c699db050e6c33ff814c5e0eb3f (diff)
downloadghdl-b1e062e701d5b225eed88691e95c747930482297.tar.gz
ghdl-b1e062e701d5b225eed88691e95c747930482297.tar.bz2
ghdl-b1e062e701d5b225eed88691e95c747930482297.zip
Handle physical units in eval_incdec.
Diffstat (limited to 'evaluation.adb')
-rw-r--r--evaluation.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/evaluation.adb b/evaluation.adb
index 4fd522c96..eb0231e41 100644
--- a/evaluation.adb
+++ b/evaluation.adb
@@ -1525,8 +1525,9 @@ package body Evaluation is
else
return Build_Enumeration (Iir_Index32 (P), Expr);
end if;
- when Iir_Kind_Physical_Int_Literal =>
- return Build_Physical (Get_Value (Expr) + N, Expr);
+ when Iir_Kind_Physical_Int_Literal
+ | Iir_Kind_Unit_Declaration =>
+ return Build_Physical (Get_Physical_Value (Expr) + N, Expr);
when others =>
Error_Kind ("eval_incdec", Expr);
end case;