aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-disp_rti.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-01-04 10:59:29 +0100
committerTristan Gingold <tgingold@free.fr>2019-01-04 13:21:17 +0100
commitaf8bab4427fe36bef335724501c7410a7268bac5 (patch)
treee5acca2309b944b13945eb5a3f0c7e8d12ae0f5d /src/grt/grt-disp_rti.adb
parentb054bf21a3a9aed8c9756c60ce8209cc800c104b (diff)
downloadghdl-af8bab4427fe36bef335724501c7410a7268bac5.tar.gz
ghdl-af8bab4427fe36bef335724501c7410a7268bac5.tar.bz2
ghdl-af8bab4427fe36bef335724501c7410a7268bac5.zip
grt/rtis: fix use of bounds for unbounded subelements.
Diffstat (limited to 'src/grt/grt-disp_rti.adb')
-rw-r--r--src/grt/grt-disp_rti.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/grt/grt-disp_rti.adb b/src/grt/grt-disp_rti.adb
index 7aa97d1f8..b3b595668 100644
--- a/src/grt/grt-disp_rti.adb
+++ b/src/grt/grt-disp_rti.adb
@@ -226,13 +226,16 @@ package body Grt.Disp_Rti is
-- FIXME: need to update bounds.
else
for I in 1 .. Length loop
- Bounds2 := Bounds;
if I /= 1 then
Put (Stream, ", ");
end if;
if Index = Last_Idx then
+ -- Humm, not always an array, and BOUNDS may not be followed
+ -- by subelement bounds.
+ Bounds2 := Array_Layout_To_Bounds (Bounds);
Disp_Value (Stream, El_Rti, Ctxt, Obj, Bounds2, Is_Sig);
else
+ Bounds2 := Bounds;
Disp_Array_Value_1
(Stream, Arr_Rti, Ctxt, Index + 1, Obj, Bounds2, Is_Sig);
end if;