diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-27 07:55:58 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-27 07:55:58 +0100 |
commit | ee772d5ea782d08b84ef8dcedffe253ea356efa2 (patch) | |
tree | 1885369c2de245986e065da519c2878000c2a2b9 /src/vhdl/translate/trans-chap3.ads | |
parent | 0512b63484398a6220156a989e7bfc6efdc5b038 (diff) | |
download | ghdl-ee772d5ea782d08b84ef8dcedffe253ea356efa2.tar.gz ghdl-ee772d5ea782d08b84ef8dcedffe253ea356efa2.tar.bz2 ghdl-ee772d5ea782d08b84ef8dcedffe253ea356efa2.zip |
translate: add Convert_Array_Base. For #1038
Diffstat (limited to 'src/vhdl/translate/trans-chap3.ads')
-rw-r--r-- | src/vhdl/translate/trans-chap3.ads | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vhdl/translate/trans-chap3.ads b/src/vhdl/translate/trans-chap3.ads index 754705533..cdd3f2715 100644 --- a/src/vhdl/translate/trans-chap3.ads +++ b/src/vhdl/translate/trans-chap3.ads @@ -170,6 +170,11 @@ package Trans.Chap3 is -- return it. function Get_Composite_Base (Obj : Mnode) return Mnode; + -- The base returned by Get_Composite_Base is always the least + -- constrained array base. But the subtype may be more constrained than + -- the base. In that case the base must be converted to the subtype. + function Convert_Array_Base (Arr : Mnode) return Mnode; + -- Get the base of array or record OBJ; but if OBJ is already constrained, -- convert it to the base of an unbounded object (so this unboxes the -- records). |