[Issue 8624] Regression: CTFE: long comparisons completely broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 6 23:44:27 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8624


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, wrong-code
                 CC|                            |clugdbug at yahoo.com.au
            Summary|CTFE: 0x6161636772 ==       |Regression: CTFE: long
                   |0x4161636772                |comparisons completely
                   |                            |broken
           Severity|normal                      |regression


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-09-06 23:44:46 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list