diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-04 17:52:47 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-06 18:20:27 +0100 |
commit | 727f3514973a5ec8b7fc86bd8db6611585bd9217 (patch) | |
tree | df8a43e84add4956b2162b602d75860b8483a2f6 /src/vhdl/translate/trans-chap6.adb | |
parent | 9b1191a6c717ae033a6bb8558e444ac1083d8100 (diff) | |
download | ghdl-727f3514973a5ec8b7fc86bd8db6611585bd9217.tar.gz ghdl-727f3514973a5ec8b7fc86bd8db6611585bd9217.tar.bz2 ghdl-727f3514973a5ec8b7fc86bd8db6611585bd9217.zip |
vhdl/translate: handle more partially constrained array subtypes. For #1038
Diffstat (limited to 'src/vhdl/translate/trans-chap6.adb')
-rw-r--r-- | src/vhdl/translate/trans-chap6.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vhdl/translate/trans-chap6.adb b/src/vhdl/translate/trans-chap6.adb index eb757d9c7..e21836a28 100644 --- a/src/vhdl/translate/trans-chap6.adb +++ b/src/vhdl/translate/trans-chap6.adb @@ -865,6 +865,7 @@ package body Trans.Chap6 is (Prefix : Mnode; El : Iir_Element_Declaration) return Mnode is El_Type : constant Iir := Get_Type (El); + El_Btype : constant Iir := Get_Base_Type (El_Type); El_Tinfo : constant Type_Info_Acc := Get_Info (El_Type); Kind : constant Object_Kind_Type := Get_Object_Kind (Prefix); Base_El : constant Iir := Get_Base_Element_Declaration (El); @@ -963,8 +964,10 @@ package body Trans.Chap6 is if Is_Unbounded_Type (El_Tinfo) then -- Ok, we know that Get_Composite_Base doesn't return a copy. - New_Assign_Stmt (M2Lp (Chap3.Get_Composite_Base (Fat_Res)), - M2Addr (Res)); + New_Assign_Stmt + (M2Lp (Chap3.Get_Composite_Base (Fat_Res)), + New_Convert_Ov (M2Addr (Res), + Get_Info (El_Btype).B.Base_Ptr_Type (Kind))); return Fat_Res; else return Res; |