浏览代码

* call first_addpointer and first_cmppointer in pass_1 for pchars as well. Fixes
huge pointer arithmetic/comparison on huge pchars.

git-svn-id: trunk@28159 -

nickysn 11 年之前
父节点
当前提交
2b2224494b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/nadd.pas

+ 2 - 2
compiler/nadd.pas

@@ -3011,9 +3011,9 @@ implementation
          else if is_pchar(ld) then
          else if is_pchar(ld) then
            begin
            begin
              if nodetype in [addn,subn,muln,andn,orn,xorn] then
              if nodetype in [addn,subn,muln,andn,orn,xorn] then
-               expectloc:=LOC_REGISTER
+               result:=first_addpointer
              else
              else
-               expectloc:=LOC_FLAGS;
+               result:=first_cmppointer;
            end
            end
 
 
          { is one of the operands a string }
          { is one of the operands a string }