Browse Source

* hopefully final fix for absolute references to absolute symbols

florian 3 years ago
parent
commit
bcab6185b9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/rautils.pas

+ 2 - 2
compiler/rautils.pas

@@ -861,8 +861,9 @@ Begin
               begin
               begin
                 setvarsize(tabstractvarsym(sym));
                 setvarsize(tabstractvarsym(sym));
                 size_set_from_absolute:=true;
                 size_set_from_absolute:=true;
+                sym:=plist^.sym;
                 { Check if address can be resolved, but only if not an array }
                 { Check if address can be resolved, but only if not an array }
-                if (tabsolutevarsym(sym).abstyp=toaddr) and not
+                if (sym.typ=absolutevarsym) and (tabsolutevarsym(sym).abstyp=toaddr) and not
                   (assigned(plist^.next) and (plist^.next^.sltype=sl_vec)) then
                   (assigned(plist^.next) and (plist^.next^.sltype=sl_vec)) then
                   begin
                   begin
                     initref;
                     initref;
@@ -872,7 +873,6 @@ Begin
                     exit;
                     exit;
                   end;
                   end;
                 { resolve the chain of array indexes (if there are any) }
                 { resolve the chain of array indexes (if there are any) }
-                sym:=plist^.sym;
                 harrdef:=nil;
                 harrdef:=nil;
                 while assigned(plist^.next) do
                 while assigned(plist^.next) do
                   begin
                   begin