diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-01-25 08:07:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-01-25 08:07:51 +0100 |
commit | d41e95268769b160adc10324525ebefb88200d36 (patch) | |
tree | 1d4639f782dbcdcb023b042dda6037e92359816d /src | |
parent | 250ac18c65fe295be227e8f2876d7cecd45f1db0 (diff) | |
download | ghdl-d41e95268769b160adc10324525ebefb88200d36.tar.gz ghdl-d41e95268769b160adc10324525ebefb88200d36.tar.bz2 ghdl-d41e95268769b160adc10324525ebefb88200d36.zip |
Fix check of conformance for physical units.
Fix issue25
Diffstat (limited to 'src')
-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 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; |