فهرست منبع

* don't allocate persistent temps for classes (they are not refcounted)

git-svn-id: trunk@14372 -
Jonas Maebe 15 سال پیش
والد
کامیت
09b4918cab
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      compiler/ncgbas.pas

+ 2 - 1
compiler/ncgbas.pas

@@ -381,7 +381,8 @@ interface
           internalerror(200108222);
 
         { get a (persistent) temp }
-        if tempinfo^.typedef.needs_inittable then
+        if (tempinfo^.typedef.needs_inittable) and
+           not is_class(tempinfo^.typedef) then
           begin
             location_reset_ref(tempinfo^.location,LOC_REFERENCE,def_cgsize(tempinfo^.typedef),0);
             tg.GetTempTyped(current_asmdata.CurrAsmList,tempinfo^.typedef,tempinfo^.temptype,tempinfo^.location.reference);