www.digitalmars.com         C & C++   DMDScript  

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


          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;

Internal error: dmd\backend\cgcod.c 1688

Jul 01 2018