aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/translate/trans-chap6.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-09-03 08:02:04 +0200
committerTristan Gingold <tgingold@free.fr>2021-09-03 08:06:29 +0200
commitce7148d0631713cacd283e1fc91da1686d2a9d24 (patch)
tree562d6f3dc073f33103e8565ce41aae2a1aee016a /src/vhdl/translate/trans-chap6.adb
parent1487ffaa14b36c1bc363a4684c42bd58c523cfbd (diff)
downloadghdl-ce7148d0631713cacd283e1fc91da1686d2a9d24.tar.gz
ghdl-ce7148d0631713cacd283e1fc91da1686d2a9d24.tar.bz2
ghdl-ce7148d0631713cacd283e1fc91da1686d2a9d24.zip
vhdl/translate: adjust slice names for unbounded arrays. Fir #1836
Diffstat (limited to 'src/vhdl/translate/trans-chap6.adb')
-rw-r--r--src/vhdl/translate/trans-chap6.adb8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vhdl/translate/trans-chap6.adb b/src/vhdl/translate/trans-chap6.adb
index 64078a13d..1e5fe6bc2 100644
--- a/src/vhdl/translate/trans-chap6.adb
+++ b/src/vhdl/translate/trans-chap6.adb
@@ -559,7 +559,8 @@ package body Trans.Chap6 is
Index_Type : constant Iir := Get_Index_Type (Prefix_Type, 0);
-- Element type.
- El_Type : constant Iir := Get_Element_Subtype (Prefix_Type);
+ El_Type : constant Iir :=
+ Chap3.Get_Element_Subtype_For_Info (Prefix_Type);
El_Tinfo : constant Type_Info_Acc := Get_Info (El_Type);
-- Type of the slice.
@@ -598,7 +599,7 @@ package body Trans.Chap6 is
if Is_Unbounded_Type (El_Tinfo) then
-- Copy layout of element before building the bounds
- pragma Assert (Is_Unbounded_Type (Prefix_Info));
+-- pragma Assert (Is_Unbounded_Type (Prefix_Info));
Stabilize (Prefix_Var);
Gen_Memcpy
(M2Addr (Chap3.Array_Bounds_To_Element_Layout
@@ -814,7 +815,8 @@ package body Trans.Chap6 is
Slice_Type : constant Iir := Get_Type (Expr);
Slice_Tinfo : constant Type_Info_Acc := Get_Info (Slice_Type);
- El_Type : constant Iir := Get_Element_Subtype (Slice_Type);
+ El_Type : constant Iir :=
+ Chap3.Get_Element_Subtype_For_Info (Slice_Type);
El_Tinfo : constant Type_Info_Acc := Get_Info (El_Type);
-- Object kind of the prefix.