From a730bf2b003c3715c19d4fa0a7c56407e3760f36 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Wed, 8 Jun 2022 00:07:05 +0200 Subject: [PATCH] Fix oversized type size constant --- compiler/llvm/dbgllvm.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/llvm/dbgllvm.pas b/compiler/llvm/dbgllvm.pas index 959dfd388f..db872fba03 100644 --- a/compiler/llvm/dbgllvm.pas +++ b/compiler/llvm/dbgllvm.pas @@ -1018,7 +1018,7 @@ implementation { LLVM internally "only" supports sizes up to 1 shl 61, because they store all sizes in bits in a qword; the rationale is that there is no hardware supporting a full 64 bit address space either } - dinode.addqword('size',qword(1) shl 61) + dinode.addqword('size',((qword(1) shl 61) - 1)*8) else {$endif def cpu64bitalu} dinode.addqword('size',def.size*8) @@ -1068,7 +1068,7 @@ implementation { LLVM internally "only" supports sizes up to 1 shl 61, because they store all sizes in bits in a qword; the rationale is that there is no hardware supporting a full 64 bit address space either } - cappedsize:=qword(1) shl 61 + cappedsize:=((qword(1) shl 61) - 1)*8 {$endif def cpu64bitalu} else cappedsize:=tabstractrecordsymtable(def.symtable).datasize*8;