Thread overview
[dmd-internals] [D-Programming-Language/dmd] 9a732a: Fix issue 8624 Regression: CTFE: long comparisons ...
Sep 10, 2012
GitHub
Sep 10, 2012
Don Clugston
Sep 10, 2012
Rainer Schuetze
September 10, 2012
  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/dmd
  Commit: 9a732a03c9f671a7c45a9f7dbe485a0b3489f997
      https://github.com/D-Programming-Language/dmd/commit/9a732a03c9f671a7c45a9f7dbe485a0b3489f997
  Author: Don Clugston <don.clugston@sociomantic.com>
  Date:   2012-09-07 (Fri, 07 Sep 2012)

  Changed paths:
    M src/interpret.c
    M test/compilable/interpret3.d

  Log Message:
  -----------
  Fix issue 8624 Regression: CTFE: long comparisons completely broken

An implicit narrowing cast from long to int. Catastrophic.


  Commit: 475178efa63597d6d55a074406678ab92f1075ed
      https://github.com/D-Programming-Language/dmd/commit/475178efa63597d6d55a074406678ab92f1075ed
  Author: Walter Bright <walter@walterbright.com>
  Date:   2012-09-10 (Mon, 10 Sep 2012)

  Changed paths:
    M src/interpret.c
    M test/compilable/interpret3.d

  Log Message:
  -----------
  Merge pull request #1112 from donc/regression8624ctfe

Fix issue 8624 Regression: CTFE: long comparisons completely broken


Compare: https://github.com/D-Programming-Language/dmd/compare/299c489f78b2...475178efa635


September 10, 2012
On 10 September 2012 10:33, GitHub <noreply@github.com> wrote:
>   Log Message:
>   -----------
>   Fix issue 8624 Regression: CTFE: long comparisons completely broken
>
> An implicit narrowing cast from long to int. Catastrophic.

We might need to do an emergency compiler release because of this bug.
It's one of the worst I've ever seen.
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals

September 10, 2012
On 10.09.2012 11:14, Don Clugston wrote:
> On 10 September 2012 10:33, GitHub <noreply@github.com> wrote:
>>    Log Message:
>>    -----------
>>    Fix issue 8624 Regression: CTFE: long comparisons completely broken
>>
>> An implicit narrowing cast from long to int. Catastrophic.
>
> We might need to do an emergency compiler release because of this bug.
> It's one of the worst I've ever seen.
>

+        {   dinteger_t c = ee1->toInteger() - ee2->toInteger();
+            if (c > 0)
+                return 1;
+            if (c < 0)
+                return 1;

Should it return -1 in the second case? It seems the test suite doesn't do a lot of CTFE long compares...

_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals