From 4b6901fb76af770f7b79c81f822c93d0f36c639d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 29 Dec 2018 07:42:30 +0100 Subject: sem_expr: fix crash when the choice subtype is not locally static. --- src/vhdl/sem_expr.adb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vhdl') diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index a9448940a..7e254583c 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -2291,6 +2291,8 @@ package body Sem_Expr is Error_Msg_Sem (+Sel, "array type must be locally static"); return; end if; + -- Use the base type so that the subtype of the choices is computed. + Sel_Type := Get_Base_Type (Sel_Type); end if; Sel_El_Type := Get_Element_Subtype (Sel_Type); Sel_El_Length := Eval_Discrete_Type_Length (Sel_El_Type); -- cgit v1.2.3