aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-01 07:33:40 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-01 07:33:40 +0100
commit518198a0bd38cbfb95c1ceaecfacfaded4efde57 (patch)
tree78c2ddc314f3b1bf8c043699f6ad3be7fc25c245 /src/vhdl
parent8ff587cb83a79f392fa5314ac73839be512ed5a7 (diff)
downloadghdl-518198a0bd38cbfb95c1ceaecfacfaded4efde57.tar.gz
ghdl-518198a0bd38cbfb95c1ceaecfacfaded4efde57.tar.bz2
ghdl-518198a0bd38cbfb95c1ceaecfacfaded4efde57.zip
Adjust previous realign patch: also adjust size variable computation.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/translate/trans-chap3.adb15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb
index 7864cc1e4..dbeeecae4 100644
--- a/src/vhdl/translate/trans-chap3.adb
+++ b/src/vhdl/translate/trans-chap3.adb
@@ -2023,12 +2023,15 @@ package body Trans.Chap3 is
-- Start with alignment of the record.
-- ALIGN = ALIGNOF (record)
- if Kind = Mode_Value then
- Align_Var := Create_Temp (Ghdl_Index_Type);
- New_Assign_Stmt
- (New_Obj (Align_Var),
- Get_Type_Alignmask (Info.B.Base_Type (Kind)));
- end if;
+ case Kind is
+ when Mode_Value =>
+ Align_Var := Create_Temp (Ghdl_Index_Type);
+ New_Assign_Stmt
+ (New_Obj (Align_Var),
+ Get_Type_Alignmask (Info.B.Base_Type (Kind)));
+ when Mode_Signal =>
+ Res := Realign (Res, Ghdl_Signal_Ptr);
+ end case;
for I in Natural loop
El := Get_Nth_Element (List, I);