https://issues.dlang.org/show_bug.cgi?id=18315
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #1 from [email protected] --- Whoops. Accidentally hit "submit". This is what dmd generates for `i > 0`: ---- neg EAX shr EAX,01Fh ---- In D: `(-i) >> 31`. That code assumes that negation always flips the sign bit. But it doesn't for `int.min`. `-int.min` is `int.min` again. --
