aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-26 16:38:07 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-26 16:38:07 +0200
commit3b45e4600aa046b3979798737b1aa3090f2070c3 (patch)
tree7d0bbc7bd7ac19752413b37fb0f0838374fa39b2 /src/ortho
parent092e788d5e00c034593d700859c001a43809038e (diff)
downloadghdl-3b45e4600aa046b3979798737b1aa3090f2070c3.tar.gz
ghdl-3b45e4600aa046b3979798737b1aa3090f2070c3.tar.bz2
ghdl-3b45e4600aa046b3979798737b1aa3090f2070c3.zip
ortho/debug: check subtype for array subtype.
Diffstat (limited to 'src/ortho')
-rw-r--r--src/ortho/debug/ortho_debug.adb7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ortho/debug/ortho_debug.adb b/src/ortho/debug/ortho_debug.adb
index 3617ebbc8..58e46b098 100644
--- a/src/ortho/debug/ortho_debug.adb
+++ b/src/ortho/debug/ortho_debug.adb
@@ -786,14 +786,11 @@ package body Ortho_Debug is
-- The element must either be ATYPE element or a constrained subtype
-- of it.
if El_Type /= Atype.El_Type then
- if El_Type.Kind = ON_Array_Subtype then
- if El_Type.Arr_Base /= Atype.El_Type then
- raise Type_Error;
- end if;
- else
+ if Get_Base_Type (El_Type) /= Atype.El_Type then
raise Type_Error;
end if;
end if;
+ Check_Constrained_Type (El_Type);
return new O_Tnode_Sub_Array'(Kind => ON_Array_Subtype,
Decl => O_Dnode_Null,