From bbbceb08d91fd7c9fa9cea193f77a901e6b676ce Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Tue, 1 Dec 2015 21:52:20 +0000 Subject: [PATCH] * fixed the number of bytes added for packed record ordinal fields in the llvm shadow table git-svn-id: trunk@32564 - --- compiler/symtable.pas | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 53c83f3d8a..dee6b1a538 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1839,12 +1839,15 @@ implementation (vardef.packedbitsize mod 8 <> 0) then begin tmpsize:=vardef.packedbitsize; - sizectr:=tmpsize+7; - repeat - symdeflist.add(tllvmshadowsymtableentry.create(u8inttype,fieldoffset+(tmpsize+7)-sizectr)); - dec(sizectr,8); - until (sizectr<=0); + sizectr:=((curroffset+tmpsize+7) shr 3)-((curroffset+7) shr 3); inc(curroffset,tmpsize); + curroffset:=0; + while sizectr<>0 do + begin + symdeflist.add(tllvmshadowsymtableentry.create(u8inttype,fieldoffset+curroffset*8)); + dec(sizectr); + inc(curroffset); + end; end else begin