Browse Source

* fixed web bug #3048: comparision of dyn. arrays

florian 21 years ago
parent
commit
e4f4b8acd6
3 changed files with 20 additions and 7 deletions
  1. 6 2
      compiler/cgobj.pas
  2. 8 3
      compiler/htypechk.pas
  3. 6 2
      compiler/nadd.pas

+ 6 - 2
compiler/cgobj.pas

@@ -1659,7 +1659,8 @@ implementation
          paraloc2:=paramanager.getintparaloc(pocall_default,2);
          paraloc2:=paramanager.getintparaloc(pocall_default,2);
          if is_ansistring(t) or
          if is_ansistring(t) or
             is_widestring(t) or
             is_widestring(t) or
-            is_interfacecom(t) then
+            is_interfacecom(t) or
+            is_dynamic_array(t) then
            a_load_const_ref(list,OS_ADDR,0,ref)
            a_load_const_ref(list,OS_ADDR,0,ref)
          else
          else
            begin
            begin
@@ -2110,7 +2111,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.161  2004-03-06 20:35:19  florian
+  Revision 1.162  2004-04-18 07:52:43  florian
+    * fixed web bug 3048: comparision of dyn. arrays
+
+  Revision 1.161  2004/03/06 20:35:19  florian
     * fixed arm compilation
     * fixed arm compilation
     * cleaned up code generation for exported linux procedures
     * cleaned up code generation for exported linux procedures
 
 

+ 8 - 3
compiler/htypechk.pas

@@ -246,8 +246,10 @@ implementation
                    exit;
                    exit;
                  end;
                  end;
                 { dynamic array compare with niln }
                 { dynamic array compare with niln }
-                if is_dynamic_array(ld) and
-                   (rt=niln) and
+                if ((is_dynamic_array(ld) and
+                   (rt=niln)) or
+                   (is_dynamic_array(ld) and is_dynamic_array(rd)))
+                   and
                    (treetyp in [equaln,unequaln]) then
                    (treetyp in [equaln,unequaln]) then
                  begin
                  begin
                    allowed:=false;
                    allowed:=false;
@@ -1921,7 +1923,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.84  2004-03-18 16:29:07  peter
+  Revision 1.85  2004-04-18 07:52:43  florian
+    * fixed web bug 3048: comparision of dyn. arrays
+
+  Revision 1.84  2004/03/18 16:29:07  peter
     * missing result initialization in node2opstr
     * missing result initialization in node2opstr
 
 
   Revision 1.83  2004/03/18 16:19:03  peter
   Revision 1.83  2004/03/18 16:19:03  peter

+ 6 - 2
compiler/nadd.pas

@@ -1091,7 +1091,8 @@ implementation
 
 
        { support dynamicarray=nil,dynamicarray<>nil }
        { support dynamicarray=nil,dynamicarray<>nil }
          else if (is_dynamic_array(ld) and (rt=niln)) or
          else if (is_dynamic_array(ld) and (rt=niln)) or
-                 (is_dynamic_array(rd) and (lt=niln)) then
+                 (is_dynamic_array(rd) and (lt=niln)) or
+                 (is_dynamic_array(ld) and is_dynamic_array(rd)) then
           begin
           begin
             if not(nodetype in [equaln,unequaln]) then
             if not(nodetype in [equaln,unequaln]) then
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
               CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
@@ -1925,7 +1926,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.115  2004-03-29 14:44:10  peter
+  Revision 1.116  2004-04-18 07:52:43  florian
+    * fixed web bug 3048: comparision of dyn. arrays
+
+  Revision 1.115  2004/03/29 14:44:10  peter
     * fixes to previous constant integer commit
     * fixes to previous constant integer commit
 
 
   Revision 1.114  2004/03/23 22:34:49  peter
   Revision 1.114  2004/03/23 22:34:49  peter