瀏覽代碼

* add explicit check that argument of sizeof(x) is a simple load node (this
was already assumed later on)

git-svn-id: trunk@29816 -

Jonas Maebe 10 年之前
父節點
當前提交
68303b8df1
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/ninl.pas

+ 4 - 0
compiler/ninl.pas

@@ -2631,6 +2631,10 @@ implementation
                   if (left.resultdef.typ<>undefineddef) and
                   if (left.resultdef.typ<>undefineddef) and
                       paramanager.push_high_param(vs_value,left.resultdef,current_procinfo.procdef.proccalloption) then
                       paramanager.push_high_param(vs_value,left.resultdef,current_procinfo.procdef.proccalloption) then
                    begin
                    begin
+                     { this should be an open array or array of const, both of
+                       which can only be simple load nodes of parameters }
+                     if left.nodetype<>loadn then
+                       internalerror(2014120701);
                      hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
                      hightree:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry));
                      if assigned(hightree) then
                      if assigned(hightree) then
                       begin
                       begin