D-Programming-Language/dmd — pull request #3805 by yebblies (2014-07-23 15:52:23+00:00)
Title: Fix Issue 12164 - Function returning ptrdiff_t.min in 64-bit returning 0 when -O is set

@WalterBright

The trick used to optimize ?const:const doesn't work when you can't actually express the value as immediates. They were silently truncated leading to incorrect results.

Values were also truncated due to a typo.

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