Browse Source

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

git-svn-id: trunk@49344 -
florian 4 years ago
parent
commit
5e1e6c24a4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/avr/cgcpu.pas

+ 3 - 1
compiler/avr/cgcpu.pas

@@ -2357,7 +2357,9 @@ unit cgcpu;
          if ref.addressmode<>AM_UNCHANGED then
          if ref.addressmode<>AM_UNCHANGED then
            internalerror(2011021706);
            internalerror(2011021706);
 
 
-        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
           begin
             reference_reset(tmpref,0,[]);
             reference_reset(tmpref,0,[]);
             tmpref.symbol:=ref.symbol;
             tmpref.symbol:=ref.symbol;