diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-06-23 18:13:41 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-06-23 18:13:41 +0200 |
commit | c98cd530f2e58ecff06c6065c6e7427bf727875d (patch) | |
tree | 11db1dec79bfb332e1e406b4a959adf170d95f83 /src/vhdl | |
parent | 4d7e1c0107a4656d76d9dbdddcd7cb34781d6d21 (diff) | |
download | ghdl-c98cd530f2e58ecff06c6065c6e7427bf727875d.tar.gz ghdl-c98cd530f2e58ecff06c6065c6e7427bf727875d.tar.bz2 ghdl-c98cd530f2e58ecff06c6065c6e7427bf727875d.zip |
synth: handle discrete choice in case statements.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-sem_expr.adb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index 2bfe77b49..e434ce0c1 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -2196,12 +2196,12 @@ package body Vhdl.Sem_Expr is is -- Compare two elements of ARR. -- Return true iff OP1 < OP2. - function Lt (Op1, Op2 : Natural) return Boolean is + function Lt (Op1, Op2 : Natural) return Boolean + is + E1 : constant Iir := Get_Choice_Expression (Info.Arr (Op1)); + E2 : constant Iir := Get_Choice_Expression (Info.Arr (Op2)); begin - return Compare_String_Literals - (Get_Choice_Expression (Info.Arr (Op1)), - Get_Choice_Expression (Info.Arr (Op2))) - = Compare_Lt; + return Compare_String_Literals (E1, E2) = Compare_Lt; end Lt; procedure Swap (From : Natural; To : Natural) is |