aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-29 07:42:30 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-29 07:42:30 +0100
commit4b6901fb76af770f7b79c81f822c93d0f36c639d (patch)
treedc472aaafed6f65f9807130d464f794c68567d4a /src/vhdl
parent116136b989083ccd725f09d49a4f194d4a749602 (diff)
downloadghdl-4b6901fb76af770f7b79c81f822c93d0f36c639d.tar.gz
ghdl-4b6901fb76af770f7b79c81f822c93d0f36c639d.tar.bz2
ghdl-4b6901fb76af770f7b79c81f822c93d0f36c639d.zip
sem_expr: fix crash when the choice subtype is not locally static.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/sem_expr.adb2
1 files changed, 2 insertions, 0 deletions
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);