From 86b02cf76e4570cd131564416ba657ad027ad5e7 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 2 Dec 2015 22:24:04 +0000 Subject: [PATCH] * handle bitpacked ordinal fields whose size is a multiple of 8 bits the same other bitpacked ordinal fields, since they can also start on a non-byte- aligned boundary git-svn-id: trunk@32570 - --- compiler/llvm/nllvmmem.pas | 3 +-- compiler/symtable.pas | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/llvm/nllvmmem.pas b/compiler/llvm/nllvmmem.pas index bb51e5bada..6a96a2fbab 100644 --- a/compiler/llvm/nllvmmem.pas +++ b/compiler/llvm/nllvmmem.pas @@ -75,8 +75,7 @@ implementation { typecast the result to the expected type, but don't actually index (that still has to be done by the generic code, so return false) } newbase:=hlcg.getaddressregister(current_asmdata.CurrAsmList,cpointerdef.getreusable(resultdef)); - if is_ordinal(resultdef) and - (resultdef.packedbitsize mod 8<>0) then + if is_ordinal(resultdef) then fielddef:= cgsize_orddef( int_cgsize( diff --git a/compiler/symtable.pas b/compiler/symtable.pas index d2c8ad00b0..0b1abc44f7 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1835,8 +1835,7 @@ implementation { after the previous one, or at the next byte boundary. } if (curroffset<>fieldoffset) then internalerror(2008051002); - if is_ordinal(vardef) and - (vardef.packedbitsize mod 8 <> 0) then + if is_ordinal(vardef) then begin tmpsize:=vardef.packedbitsize; sizectr:=((curroffset+tmpsize+7) shr 3)-((curroffset+7) shr 3);