Browse Source

* small bugfix in ArrayRefsEq

Jonas Maebe 26 years ago
parent
commit
2ad775b888
1 changed files with 8 additions and 3 deletions
  1. 8 3
      compiler/daopt386.pas

+ 8 - 3
compiler/daopt386.pas

@@ -1656,8 +1656,10 @@ End;
 Function ArrayRefsEq(const r1, r2: TReference): Boolean;
 Function ArrayRefsEq(const r1, r2: TReference): Boolean;
 Begin
 Begin
   ArrayRefsEq := (R1.Offset+R1.OffsetFixup = R2.Offset+R2.OffsetFixup) And
   ArrayRefsEq := (R1.Offset+R1.OffsetFixup = R2.Offset+R2.OffsetFixup) And
-                 (R1.Segment = R2.Segment) And (R1.Base = R2.Base) And
-                 (R1.Symbol=R2.Symbol);
+                 (R1.Segment = R2.Segment) And
+                 (R1.Symbol=R2.Symbol) And
+                 ((Assigned(R1.Symbol)) Or
+                  (R1.Base = R2.Base))
 End;
 End;
 
 
 
 
@@ -2383,7 +2385,10 @@ End.
 
 
 {
 {
  $Log$
  $Log$
- Revision 1.61  1999-09-29 13:49:53  jonas
+ Revision 1.62  1999-10-07 16:07:35  jonas
+   * small bugfix in ArrayRefsEq
+
+ Revision 1.61  1999/09/29 13:49:53  jonas
    * writing to a position in an array now only destroys registers
    * writing to a position in an array now only destroys registers
      containing a reference pointing somewhere in that array (since my last
      containing a reference pointing somewhere in that array (since my last
      fix, it behaved like a write to a pointer location)
      fix, it behaved like a write to a pointer location)