Explorar el Código

* test vmt only for classes and objects

git-svn-id: trunk@2762 -
florian hace 19 años
padre
commit
6952e63222
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      compiler/ncgutil.pas

+ 7 - 2
compiler/ncgutil.pas

@@ -2436,8 +2436,13 @@ implementation
           end;
         vmtreg:=cg.getaddressregister(list);
         cg.g_maybe_testself(list,href.base);
-        cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,vmtreg);
-        cg.g_maybe_testvmt(list,vmtreg,objdef);
+        { test validity of VMT }
+        if not(is_interface(objdef)) and
+           not(is_cppclass(objdef)) then
+           begin
+             cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,vmtreg);
+             cg.g_maybe_testvmt(list,vmtreg,objdef);
+           end;
       end;