[Issue 3173] ICE(mtype.c) on wrong code (double to long to int conversion)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 1 04:25:14 PDT 2009


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





--- Comment #3 from Don <clugdbug at yahoo.com.au>  2009-09-01 04:25:11 PDT ---
Patch was incomplete, fails for the test case below. Need to also add this code
to the end of CastExp::getIntRange()

+   if (type->isintegral()) {
    ir.imin &= type->sizemask();
    ir.imax &= type->sizemask();
+    }
   return ir;
}

====
Test case:

  ubyte b = 6;
  short c5 = cast(int)(b + 6.1);
====
This is arguably an ice-on-valid-code.

-- 
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