From 7da5987d03d2fe6d2db1434c28c759e94650c3ae Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 20 Aug 2011 20:37:09 +0000 Subject: [PATCH] * fixed passing single elements to open array var-parameters on non-managed platforms after r18561 (newly introduced element-to-open-array type conversion retains the value location on those platforms) git-svn-id: branches/jvmbackend@18793 - --- compiler/ncnv.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index d5aa429e76..c8a518e3da 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -3360,7 +3360,11 @@ implementation { int 2 bool/bool 2 int, explicit typecast, see also nx86cnv } ((convtype in [tc_int_2_bool,tc_bool_2_int,tc_bool_2_bool]) and (nf_explicit in flags) and - (resultdef.size=left.resultdef.size)); + (resultdef.size=left.resultdef.size)) or + { on managed platforms, converting an element to an open array + involves creating an actual array -> value location changes } + ((convtype=tc_elem_2_openarray) and + not(target_info.system in systems_managed_vm)); end;