aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-03-02 06:01:24 +0100
committerTristan Gingold <tgingold@free.fr>2022-03-02 06:03:26 +0100
commit665a999044f017e5161bae6bd7b93055777718da (patch)
tree10ea5906f9d2ca829f4b6b5ee48d878cebedec63 /src
parent182770c28bbc3d84e5c39b504790c3a6bbf162d3 (diff)
downloadghdl-665a999044f017e5161bae6bd7b93055777718da.tar.gz
ghdl-665a999044f017e5161bae6bd7b93055777718da.tar.bz2
ghdl-665a999044f017e5161bae6bd7b93055777718da.zip
elab-vhdl_expr.adb(exec_name_subtype): handle indexed names. Fix #1986
Diffstat (limited to 'src')
-rw-r--r--src/synth/elab-vhdl_expr.adb8
1 files changed, 8 insertions, 0 deletions
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));