Bug 19045 – [ICE] Casting from real to ulong in comparison causes fails to compile

Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-07-02T00:35:32Z
Last change time
2024-12-13T18:59:25Z
Keywords
backend, ice, ice-on-valid-code
Assigned to
No Owner
Creator
Computermatronic
Moved to GitHub: dmd#19452 →

Comments

Comment #0 by computermatronic — 2018-07-02T00:35:32Z
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
Comment #1 by b2.temp — 2019-07-02T12:53:22Z
`real` is not a factor, can be `float` or `double` too. `ulong` is a factor.
Comment #2 by robert.schadek — 2024-12-13T18:59:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19452 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB