浏览代码

* patch by Christo Crause: handle references to absolute address 0 correctly, resolves #38861

git-svn-id: trunk@49344 -
(cherry picked from commit 5e1e6c24a48a41549d7293f18fb04805adbc5570)
florian 4 年之前
父节点
当前提交
e168707f5b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/avr/cgcpu.pas

+ 3 - 1
compiler/avr/cgcpu.pas

@@ -2364,7 +2364,9 @@ unit cgcpu;
          if ref.addressmode<>AM_UNCHANGED then
            internalerror(2011021701);
 
-        if assigned(ref.symbol) or (ref.offset<>0) then
+         if assigned(ref.symbol) or (ref.offset<>0) or
+           { If no other reference information it must imply an absolute reference to address 0 }
+           ((ref.index=NR_NO) and (ref.base=NR_NO)) then
           begin
             reference_reset(tmpref,0,[]);
             tmpref.symbol:=ref.symbol;