diff options
Diffstat (limited to 'src/vhdl/vhdl-sem_expr.adb')
-rw-r--r-- | src/vhdl/vhdl-sem_expr.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index 4294e71c2..a801afdbe 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -2315,6 +2315,13 @@ package body Vhdl.Sem_Expr is return; end if; + -- If the choice is an aggregate (which could be static in vhdl08), + -- transform it into a simple aggregate to ease the comparisons. + if Get_Kind (Expr) = Iir_Kind_Aggregate then + Expr := Eval_String_Literal (Expr); + Set_Choice_Expression (Choice, Expr); + end if; + Choice_Len := Eval_Discrete_Type_Length (Get_String_Type_Bound_Type (Get_Type (Expr))); if Sel_Length = -1 then |