http://d.puremagic.com/issues/show_bug.cgi?id=3041


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugd...@yahoo.com.au




--- Comment #1 from Don <clugd...@yahoo.com.au>  2009-06-08 16:17:25 PDT ---

Root cause: CmpExp::toElem() and EqualExp::toElem() have a special case
for a[] == b[], but not for a[]==b.

--- e2ir.c    (revision 27)
+++ e2ir.c    (working copy)
@@ -2191,6 +2191,14 @@
     e = el_bin(eop, TYint, e, el_long(TYint, 0));
     el_setLoc(e,loc);
     }
+    else if ((int)eop > 1 &&
+         (t1->ty == Tarray || t1->ty == Tsarray) ||
+         (t2->ty == Tarray || t2->ty == Tsarray))
+    {
+        error("Invalid array comparison operation");
+        e = toElemBin(irs, eop);
+        return e;
+    }
     else
     {
     if ((int)eop <= 1)
@@ -2285,6 +2293,14 @@
         e = el_bin(OPxor, TYint, e, el_long(TYint, 1));
     el_setLoc(e,loc);
     }
+    else if ((t1->ty == Tarray || t1->ty == Tsarray) ||
+         (t2->ty == Tarray || t2->ty == Tsarray))
+    {
+    error("Invalid array equality operation");
+    e = toElemBin(irs, eop);
+    return e;
+
+    }
     else
     e = toElemBin(irs, eop);
     return e;
*/

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to