From b1e062e701d5b225eed88691e95c747930482297 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 4 Jan 2014 01:48:22 +0100 Subject: Handle physical units in eval_incdec. --- evaluation.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'evaluation.adb') 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; -- cgit v1.2.3