Browse Source

* fixed bug #301

peter 26 years ago
parent
commit
4a74f18756
2 changed files with 8 additions and 4 deletions
  1. 2 2
      bugs/readme.txt
  2. 6 2
      compiler/cgai386.pas

+ 2 - 2
bugs/readme.txt

@@ -351,7 +351,8 @@ Fixed bugs:
   bug0296.pp   exit(string) does not work (web form bug 613)        OK 0.99.13 (PM)
   bug0296.pp   exit(string) does not work (web form bug 613)        OK 0.99.13 (PM)
   bug0298.pp   l1+l2:=l1+l2 gives no error                          OK 0.99.13 (PFV)
   bug0298.pp   l1+l2:=l1+l2 gives no error                          OK 0.99.13 (PFV)
   bug0300.pp   crash if method on non existing object is parsed (form bug 651) OK 0.99.13 (PFV)
   bug0300.pp   crash if method on non existing object is parsed (form bug 651) OK 0.99.13 (PFV)
-
+  bug0301.pp   crash if destructor without object name is parsed    OK 0.99.13 (PFV)
+  
 
 
 Unproducable bugs:
 Unproducable bugs:
 ------------------
 ------------------
@@ -390,4 +391,3 @@ bug0281.pp   dup id checking with property is wrong
 bug0293.pp   no error with variable name = type name
 bug0293.pp   no error with variable name = type name
 bug0297.pp   calling of interrupt procedure allowed but wrong code generated
 bug0297.pp   calling of interrupt procedure allowed but wrong code generated
 bug0299.pp   passing Array[0..1] of char by value to proc leads to problems
 bug0299.pp   passing Array[0..1] of char by value to proc leads to problems
-bug0301.pp   crash if destructor without object name is parsed

+ 6 - 2
compiler/cgai386.pas

@@ -3190,7 +3190,8 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
         exprasmlist^.insert(new(pai_label,init(aktexitlabel)));
         exprasmlist^.insert(new(pai_label,init(aktexitlabel)));
 
 
       { call the destructor help procedure }
       { call the destructor help procedure }
-      if (aktprocsym^.definition^.proctypeoption=potype_destructor) then
+      if (aktprocsym^.definition^.proctypeoption=potype_destructor) and
+         assigned(procinfo^._class) then
         begin
         begin
           if procinfo^._class^.is_class then
           if procinfo^._class^.is_class then
             begin
             begin
@@ -3446,7 +3447,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.55  1999-10-21 16:41:38  florian
+  Revision 1.56  1999-10-25 12:18:11  peter
+    * fixed bug 301
+
+  Revision 1.55  1999/10/21 16:41:38  florian
     * problems with readln fixed: esi wasn't restored correctly when
     * problems with readln fixed: esi wasn't restored correctly when
       reading ordinal fields of objects futher the register allocation
       reading ordinal fields of objects futher the register allocation
       didn't take care of the extra register when reading ordinal values
       didn't take care of the extra register when reading ordinal values