diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-01 21:23:40 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-01 21:23:40 +0200 |
commit | 84f15226f84de0f81b60ae7cfdf6abbc52550f8b (patch) | |
tree | 0f7f1bc9961f19fe149fd0fa9e06aa9bb66cdaec /src | |
parent | d9be7ace78ec20c4b42fae9a956b3a9ce44d5dab (diff) | |
download | ghdl-84f15226f84de0f81b60ae7cfdf6abbc52550f8b.tar.gz ghdl-84f15226f84de0f81b60ae7cfdf6abbc52550f8b.tar.bz2 ghdl-84f15226f84de0f81b60ae7cfdf6abbc52550f8b.zip |
trans-chap3: fix handling of unbounded element subtype
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/translate/trans-chap3.adb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb index 35bd8044e..8e5cb9f33 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -677,12 +677,18 @@ package body Trans.Chap3 is -- Element. if Tinfo.B.Bounds_El /= O_Fnode_Null then -- TODO: should be directly elaborated in place. - El_Tinfo := Get_Info (Get_Element_Subtype (Def)); - Gen_Memcpy - (M2Addr (Array_Bounds_To_Element_Layout (Targ, Def)), - M2Addr (Get_Composite_Type_Layout (El_Tinfo)), - New_Lit (New_Sizeof (El_Tinfo.B.Layout_Type, - Ghdl_Index_Type))); + if False then + El_Tinfo := Get_Info (Get_Element_Subtype (Def)); + Gen_Memcpy + (M2Addr (Array_Bounds_To_Element_Layout (Targ, Def)), + M2Addr (Get_Composite_Type_Layout (El_Tinfo)), + New_Lit (New_Sizeof (El_Tinfo.B.Layout_Type, + Ghdl_Index_Type))); + else + Elab_Composite_Subtype_Layout + (Get_Element_Subtype (Def), + Array_Bounds_To_Element_Layout (Targ, Def)); + end if; end if; end; |