From 665a999044f017e5161bae6bd7b93055777718da Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 2 Mar 2022 06:01:24 +0100 Subject: elab-vhdl_expr.adb(exec_name_subtype): handle indexed names. Fix #1986 --- src/synth/elab-vhdl_expr.adb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/synth/elab-vhdl_expr.adb b/src/synth/elab-vhdl_expr.adb index b83247855..0933e772e 100644 --- a/src/synth/elab-vhdl_expr.adb +++ b/src/synth/elab-vhdl_expr.adb @@ -742,6 +742,14 @@ package body Elab.Vhdl_Expr is Res := Res.Rec.E (Idx + 1).Typ; return Res; end; + when Iir_Kind_Indexed_Name => + declare + Pfx : constant Node := Get_Prefix (Name); + Res : Type_Acc; + begin + Res := Exec_Name_Subtype (Syn_Inst, Pfx); + return Res.Arr_El; + end; when Iir_Kind_Enumeration_Literal | Iir_Kind_Unit_Declaration => return Get_Subtype_Object (Syn_Inst, Get_Type (Name)); -- cgit v1.2.3