浏览代码

* give an internalerror when we try to change the type of an asmsymbol from
anything but none (= undefined) to local

git-svn-id: trunk@25266 -

Jonas Maebe 12 年之前
父节点
当前提交
da6d9cf3f3
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/aasmtai.pas

+ 4 - 0
compiler/aasmtai.pas

@@ -1288,6 +1288,10 @@ implementation
          typ:=ait_symbol;
          typ:=ait_symbol;
          sym:=_sym;
          sym:=_sym;
          size:=siz;
          size:=siz;
+         { don't redefine global/external symbols as local, as code to access
+           such symbols is different on some platforms }
+         if not(sym.bind in [AB_NONE,AB_LOCAL]) then
+           internalerror(2013081601);
          sym.bind:=AB_LOCAL;
          sym.bind:=AB_LOCAL;
          is_global:=false;
          is_global:=false;
       end;
       end;