aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-08-05 19:02:40 +0200
committerTristan Gingold <tgingold@free.fr>2020-08-05 19:02:40 +0200
commit035eb113732f0c48b793e81301953d0e6ca6ba20 (patch)
treeeca927a74c55bf53b0d1ffc20f0da5b6ccd96edd /src/ortho
parent8b101ef0fdb36145cbd7afbfe46fdd5a09237170 (diff)
downloadghdl-035eb113732f0c48b793e81301953d0e6ca6ba20.tar.gz
ghdl-035eb113732f0c48b793e81301953d0e6ca6ba20.tar.bz2
ghdl-035eb113732f0c48b793e81301953d0e6ca6ba20.zip
ortho/debug: fix type of indexed_name.
Diffstat (limited to 'src/ortho')
-rw-r--r--src/ortho/debug/ortho_debug.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ortho/debug/ortho_debug.adb b/src/ortho/debug/ortho_debug.adb
index 58e46b098..e7da56f58 100644
--- a/src/ortho/debug/ortho_debug.adb
+++ b/src/ortho/debug/ortho_debug.adb
@@ -1094,6 +1094,7 @@ package body Ortho_Debug is
return O_Lnode
is
subtype O_Lnode_Indexed is O_Lnode_Type (OL_Indexed_Element);
+ El_Type : O_Tnode;
Res : O_Lnode;
begin
if Arr.Rtype.Kind not in ON_Array_Kinds then
@@ -1101,10 +1102,11 @@ package body Ortho_Debug is
raise Type_Error;
end if;
-- The element type of ARR must be constrained.
- Check_Constrained_Type (Get_Array_El_Type (Arr.Rtype));
+ El_Type := Get_Array_El_Type (Arr.Rtype);
+ Check_Constrained_Type (El_Type);
Check_Ref (Arr);
Res := new O_Lnode_Indexed'(Kind => OL_Indexed_Element,
- Rtype => Get_Base_Type (Arr.Rtype).El_Type,
+ Rtype => El_Type,
Ref => False,
Array_Base => Arr,
Index => Index);