aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index 934584566..17be7396a 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -610,7 +610,11 @@ package body Synth.Stmts is
pragma Assert (Choice_Idx = Choice_Data'Last);
-- Sort by order.
- Sort_String_Choices (Case_Info);
+ if Get_Kind (Get_Type (Expr)) in Iir_Kinds_Discrete_Type_Definition then
+ Sort_Discrete_Choices (Case_Info);
+ else
+ Sort_String_Choices (Case_Info);
+ end if;
-- Create list of wire_id, sort it.
Nbr_Wires := Count_Wires_In_Alternatives (Alts.all);