From 233185a4e5311054c5e4a81ed49169ed4744a4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Wed, 4 Jan 2017 05:01:53 +0000 Subject: [PATCH] rtti: make aligntoqword to always align to the same size as typinfo/AlignTypeData. this fixes m68k crashes in RTTI after r35218 git-svn-id: trunk@35228 - --- rtl/inc/system.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 043765652e..73ef977b0c 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -445,11 +445,14 @@ function aligntoptr(p : pointer) : pointer;inline; function aligntoqword(p : pointer) : pointer;inline; +{$push} +{$packrecords c} type TAlignCheck = record b : byte; q : qword; end; +{$pop} begin {$ifdef FPC_REQUIRES_PROPER_ALIGNMENT} result:=align(p,PtrInt(@TAlignCheck(nil^).q))