[Issue 18315] New: wrong code for `i > 0`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 27 14:42:08 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18315

          Issue ID: 18315
           Summary: wrong code for `i > 0`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

Found by kdevel who posted to D.learn:
https://forum.dlang.org/post/nbcmkpeyfoqljulmfmsg@forum.dlang.org

----
void main ()
{
   int i = int.min;
   bool b = i > 0;
   assert(!b); /* fails */
}
----

--


More information about the Digitalmars-d-bugs mailing list