From d41e95268769b160adc10324525ebefb88200d36 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 25 Jan 2016 08:07:51 +0100 Subject: Fix check of conformance for physical units. Fix issue25 --- src/vhdl/sem.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb index bba4075a1..cd238c475 100644 --- a/src/vhdl/sem.adb +++ b/src/vhdl/sem.adb @@ -1412,12 +1412,15 @@ package body Sem is Get_Literal_Origin (Right)); when Iir_Kind_Physical_Fp_Literal => if Get_Fp_Value (Left) /= Get_Fp_Value (Right) - or else Get_Unit_Name (Left) /= Get_Unit_Name (Right) + or else not Are_Trees_Equal (Get_Unit_Name (Left), + Get_Unit_Name (Right)) then return False; end if; return Are_Trees_Equal (Get_Literal_Origin (Left), Get_Literal_Origin (Right)); + when Iir_Kind_Unit_Declaration => + return Left = Right; when Iir_Kind_Floating_Point_Literal => if Get_Fp_Value (Left) /= Get_Fp_Value (Right) then return False; -- cgit v1.2.3