www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19045] New: [ICE] Casting from real to ulong in comparison

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

          Issue ID: 19045
           Summary: [ICE] Casting from real to ulong in comparison causes
                    fails to compile
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: computermatronic gmail.com

Casting from a real to a ulong in a comparison does not compile, resulting in
an internal compiler error.

Test case:
void main() {
        real r = 10;
        bool b = cast(ulong)r == 0;
}

Output:
Internal error: dmd\backend\cgcod.c 1688

--
Jul 01 2018