From 035eb113732f0c48b793e81301953d0e6ca6ba20 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 5 Aug 2020 19:02:40 +0200 Subject: ortho/debug: fix type of indexed_name. --- src/ortho/debug/ortho_debug.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ortho') 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); -- cgit v1.2.3