www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13634] New: Value range propogation applied incorrectly.

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

          Issue ID: 13634
           Summary: Value range propogation applied incorrectly.
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: gordon.freeman.sullied gmail.com

long a = 0;
long b = 9223372036854775807;

a = cast(double) b;
writeln(b);
writeln(a);


The results are:
b = 9223372036854775807
a = -9223372036854775808

This should not be possible.

--
Oct 18 2014