This is one of the worst bugs of all time. I can't believe this slipped through the test suite. The top 32 bits of longs is entirely ignored in CTFE == and != comparisons. Reduced test case:
====================
int bug8624()
{
long m = 0x1_0000_0000;
assert(m != 0);
return 1;
}
static assert( bug8624() );
====================
It's a typo in interpret.c, which results in an implicit conversion from long to int.
This might be worth an emergency release.
Comment #2 by braddr — 2012-09-07T17:41:58Z
In which version did it last work correctly?
Comment #3 by bugzilla — 2012-09-08T13:14:27Z
(In reply to comment #1)
> It's a typo in interpret.c, which results in an implicit conversion from long
> to int.
> This might be worth an emergency release.
Please post pull request, and I'll get it pulled at least.
Comment #4 by github-bugzilla — 2012-09-10T01:33:07Z