From af98f9e39dcc81c536fa4693d66a376ab394625c Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 10 Aug 2014 19:40:08 +0000 Subject: [PATCH] * initialise expectloc for passthrough first_bool_to_int() and first_int_to_bool() git-svn-id: branches/hlcgllvm@28368 - --- compiler/ncnv.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index 4c0f14937b..bddc8eced3 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -3053,7 +3053,10 @@ implementation if (nf_explicit in flags) and (left.resultdef.size=resultdef.size) and (left.expectloc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER]) then - exit; + begin + expectloc:=left.expectloc; + exit; + end; expectloc:=LOC_REGISTER; end; @@ -3067,7 +3070,10 @@ implementation if (nf_explicit in flags) and (left.resultdef.size=resultdef.size) and (left.expectloc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER]) then - exit; + begin + expectloc:=left.expectloc; + exit; + end; { when converting 64bit int to C-ctyle boolean, first convert to an int32 and then } { convert to a boolean (only necessary for 32bit processors) } if (left.resultdef.size > sizeof(aint)) and (left.resultdef.size<>resultdef.size)