diff options
author | Tristan Gingold | 2016-01-25 08:07:51 +0100 |
---|---|---|
committer | Tristan Gingold | 2016-01-25 08:07:51 +0100 |
commit | d41e95268769b160adc10324525ebefb88200d36 (patch) | |
tree | 1d4639f782dbcdcb023b042dda6037e92359816d | |
parent | 250ac18c65fe295be227e8f2876d7cecd45f1db0 (diff) | |
download | ghdl-d41e95268769b160adc10324525ebefb88200d36.tar.gz ghdl-d41e95268769b160adc10324525ebefb88200d36.tar.bz2 ghdl-d41e95268769b160adc10324525ebefb88200d36.zip |
Fix check of conformance for physical units.
Fix issue25
-rw-r--r-- | src/vhdl/sem.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb index bba4075..cd238c4 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; |