Browse Source

* 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 -

Jonas Maebe 14 years ago
parent
commit
7da5987d03
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/ncnv.pas

+ 5 - 1
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;