Browse Source

* decrrefcount resets temps to nil

peter 21 years ago
parent
commit
fa9e45b7cb
2 changed files with 13 additions and 3 deletions
  1. 7 1
      compiler/cgobj.pas
  2. 6 2
      compiler/options.pas

+ 7 - 1
compiler/cgobj.pas

@@ -1625,6 +1625,9 @@ implementation
             a_call_name(list,'FPC_DECREF');
             deallocexplicitregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
          end;
+        { Temp locations need always to be reset to 0 }
+        if tg.istemp(ref) then
+          a_load_const_ref(list,OS_ADDR,0,ref);
       end;
 
 
@@ -2109,7 +2112,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.150  2004-01-21 21:01:34  peter
+  Revision 1.151  2004-01-21 22:13:20  peter
+    * decrrefcount resets temps to nil
+
+  Revision 1.150  2004/01/21 21:01:34  peter
     * fixed stackchecking for register calling
 
   Revision 1.149  2004/01/20 12:59:36  florian

+ 6 - 2
compiler/options.pas

@@ -1689,7 +1689,8 @@ begin
   def_symbol('NOCLASSHELPERS');
   if pocall_default = pocall_register then
     def_symbol('REGCALL');
-
+  def_symbol('DECRREFNOTNIL');
+  
 { using a case is pretty useless here (FK) }
 { some stuff for TP compatibility }
 {$ifdef i386}
@@ -1994,7 +1995,10 @@ finalization
 end.
 {
   $Log$
-  Revision 1.120  2004-01-10 00:16:21  jonas
+  Revision 1.121  2004-01-21 22:13:20  peter
+    * decrrefcount resets temps to nil
+
+  Revision 1.120  2004/01/10 00:16:21  jonas
     * fixed mtfsb0 instruction for assembler reader/writer
     * fixed initialisation of fpscr register to avoid spurious SIGPFE's
       (uses mtfsb0 instruction, so added extra define in options.pas to avoid