Browse Source

* correctly set the expectloc for int_2_int type conversions of bitpacked
arrays (and some other, related constructs) (mantis #15789)

git-svn-id: trunk@14927 -

Jonas Maebe 15 years ago
parent
commit
cda17ad02a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/ncnv.pas

+ 2 - 1
compiler/ncnv.pas

@@ -2283,7 +2283,8 @@ implementation
         if not is_void(left.resultdef) then
         if not is_void(left.resultdef) then
           begin
           begin
             if (left.expectloc<>LOC_REGISTER) and
             if (left.expectloc<>LOC_REGISTER) and
-               (resultdef.size>left.resultdef.size) then
+                ((resultdef.size>left.resultdef.size) or
+                 (left.expectloc in [LOC_SUBSETREF,LOC_CSUBSETREF,LOC_SUBSETREG,LOC_CSUBSETREG])) then
               expectloc:=LOC_REGISTER
               expectloc:=LOC_REGISTER
             else
             else
               if (left.expectloc=LOC_CREGISTER) and
               if (left.expectloc=LOC_CREGISTER) and