[Issue 3304] Segfault using 'is' with a pointer enum.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 7 08:00:18 PDT 2009


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code, patch


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2009-09-07 08:00:17 PDT ---
Root cause: IndentityExp didn't consider the possibility that Equals() can
return CANTINTERPRET.

patch: In optimize.c, IdentityExp::optimize, line 838 (DMD2.032)

    if ((this->e1->isConst()     && this->e2->isConst()) ||
    (this->e1->op == TOKnull && this->e2->op == TOKnull))
    {
    e = Identity(op, type, this->e1, this->e2);
+    if (e == EXP_CANT_INTERPRET)
+        e = this;
    }
    return e;

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


More information about the Digitalmars-d-bugs mailing list