diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-10-24 05:15:40 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-10-24 05:15:40 +0200 |
commit | ffd7808c74dd326f11c7373118ed85354076211e (patch) | |
tree | 9007cb21bea3294a78d7b9b48aec646236acf4bc | |
parent | 25aa43339b6e297325ed67c2192cb9bc398cff39 (diff) | |
download | ghdl-ffd7808c74dd326f11c7373118ed85354076211e.tar.gz ghdl-ffd7808c74dd326f11c7373118ed85354076211e.tar.bz2 ghdl-ffd7808c74dd326f11c7373118ed85354076211e.zip |
translate chap8: layout base bounds for unbounded individual assoc.
-rw-r--r-- | src/vhdl/translate/trans-chap3.ads | 3 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap8.adb | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/vhdl/translate/trans-chap3.ads b/src/vhdl/translate/trans-chap3.ads index 2b9f37e6b..783e1ae90 100644 --- a/src/vhdl/translate/trans-chap3.ads +++ b/src/vhdl/translate/trans-chap3.ads @@ -126,6 +126,9 @@ package Trans.Chap3 is -- number of dimensions; these fields are a structure describing the -- range of the dimension. + procedure Gen_Call_Type_Builder + (Layout : Mnode; Var_Type : Iir; Kind : Object_Kind_Type); + -- If the element subtype of ARR_TYPE is unbounded, create a fat pointer, -- set the bounds of it (from ARR), and return it. -- Otherwise, return a null mnode. diff --git a/src/vhdl/translate/trans-chap8.adb b/src/vhdl/translate/trans-chap8.adb index 318d0142f..4d608c839 100644 --- a/src/vhdl/translate/trans-chap8.adb +++ b/src/vhdl/translate/trans-chap8.adb @@ -2893,6 +2893,11 @@ package body Trans.Chap8 is or else (Get_Interface_Of_Formal (Get_Formal (Next_Assoc)) /= Base_Formal) then + -- * compute the size of the object + Chap3.Gen_Call_Type_Builder + (Chap3.Get_Composite_Bounds (Params (Last_Individual)), + Get_Type (Base_Formal), Formal_Object_Kind); + -- * allocate base Chap3.Allocate_Unbounded_Composite_Base (Alloc, Saved_Val (Last_Individual), |