From 2b9455e262e7e7f7333180268dac1cb0263b4143 Mon Sep 17 00:00:00 2001 From: "J. Gareth \"Curious Kit\" Moreton" Date: Thu, 6 Mar 2025 11:30:23 +0000 Subject: [PATCH] * Fixed internal error 200411013 when typecasting and dereferencing nil into an array --- compiler/ncgmem.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/ncgmem.pas b/compiler/ncgmem.pas index ec75918411..fc4a3e3ff9 100644 --- a/compiler/ncgmem.pas +++ b/compiler/ncgmem.pas @@ -974,6 +974,10 @@ implementation hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef); location_copy(location,left.location); end; + LOC_CONSTANT: { Usually 'nil' } + begin + hlcg.reference_reset_base(location.reference,left.resultdef,NR_NO,left.location.value,ctempposinvalid,location.reference.alignment,[]); + end; LOC_INVALID: Internalerror(2019061101); else