aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-vhdl_expr.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-22 09:50:52 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-22 09:50:52 +0200
commitcf174bacdd68c09417b810775025a749bd892ef2 (patch)
treeb4dc8d5cb79414c6762da01241d24e4d787ba93e /src/synth/synth-vhdl_expr.adb
parentd010636f5bb5cf00f6f26fd6e83a21b8a1dd5c2a (diff)
downloadghdl-cf174bacdd68c09417b810775025a749bd892ef2.tar.gz
ghdl-cf174bacdd68c09417b810775025a749bd892ef2.tar.bz2
ghdl-cf174bacdd68c09417b810775025a749bd892ef2.zip
synth: use same elements for unbounded arrays and vectors
Diffstat (limited to 'src/synth/synth-vhdl_expr.adb')
-rw-r--r--src/synth/synth-vhdl_expr.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb
index f9333b5d6..fe1fb0cbe 100644
--- a/src/synth/synth-vhdl_expr.adb
+++ b/src/synth/synth-vhdl_expr.adb
@@ -490,7 +490,8 @@ package body Synth.Vhdl_Expr is
declare
Bnds : constant Type_Acc := Get_Subtype_Object (Syn_Inst, Atype);
begin
- return Get_Array_Bound (Bnds, Dim);
+ pragma Assert (Dim = 1);
+ return Get_Array_Bound (Bnds);
end;
end if;
end Synth_Array_Bounds;
@@ -826,7 +827,7 @@ package body Synth.Vhdl_Expr is
Strip_Const (Idx_Val);
- Bnd := Get_Array_Bound (Arr_Typ, 1);
+ Bnd := Get_Array_Bound (Arr_Typ);
if Is_Static_Val (Idx_Val.Val) then
Idx := Get_Static_Discrete (Idx_Val);