From cf174bacdd68c09417b810775025a749bd892ef2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 22 May 2022 09:50:52 +0200 Subject: synth: use same elements for unbounded arrays and vectors --- src/synth/synth-vhdl_expr.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/synth/synth-vhdl_expr.adb') 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); -- cgit v1.2.3