From e26ab8447c12b8cc052ee92f4e9fd3bdcaf4217a Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 13 Feb 2005 19:57:15 +0000 Subject: [PATCH] * better alignment checking --- compiler/ncgld.pas | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/compiler/ncgld.pas b/compiler/ncgld.pas index 7df1fa5dbc..9a8f2f5a2d 100644 --- a/compiler/ncgld.pas +++ b/compiler/ncgld.pas @@ -599,9 +599,9 @@ implementation {$warning HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler} { Use unaligned copy when the offset is not aligned } len:=left.resulttype.def.size; - if ((right.location.reference.offset mod sizeof(aint)<>0) or - (left.location.reference.offset mod sizeof(aint)<>0)) and - (len>=sizeof(aint)) then + if (right.location.reference.offset mod sizeof(aint)<>0) or + (left.location.reference.offset mod sizeof(aint)<>0) or + (right.resulttype.def.alignment