[dmd-internals] [D-Programming-Language/dmd] 5ea992: fix Issue 15251 - std.datetime bug with -inline

GitHub via dmd-internals dmd-internals at puremagic.com
Wed Oct 28 01:40:36 PDT 2015


  Branch: refs/heads/stable
  Home:   https://github.com/D-Programming-Language/dmd
  Commit: 5ea992ff02f216438341f17835560d3d818124be
      https://github.com/D-Programming-Language/dmd/commit/5ea992ff02f216438341f17835560d3d818124be
  Author: k-hara <k.hara.pg at gmail.com>
  Date:   2015-10-28 (Wed, 28 Oct 2015)

  Changed paths:
    M src/dinterpret.d
    M test/compilable/interpret3.d

  Log Message:
  -----------
  fix Issue 15251 - std.datetime bug with -inline

The problem is in CTFE interpreter.

Inlining had introduced `cast(void)` expression to `ForStatement.increment` part,
then it had hit following interpret issues.

1. `CastExp.interpret` does not work for `cast(void)` if `goal` is not `ctfeNeedNothing`.
2. `ForStatement.interpert` does not evaluate its `increment` part with `ctfeNeedNothing`.

I fix both of them for the best work, although fixing one of them can fix the original issue,


  Commit: 1b21ea36893838e30e6b861b4e9000a276cad5d6
      https://github.com/D-Programming-Language/dmd/commit/1b21ea36893838e30e6b861b4e9000a276cad5d6
  Author: Martin Nowak <code at dawg.eu>
  Date:   2015-10-28 (Wed, 28 Oct 2015)

  Changed paths:
    M src/dinterpret.d
    M test/compilable/interpret3.d

  Log Message:
  -----------
  Merge pull request #5235 from 9rnsr/fix15251

[REG2.069.0-rc1] Issue 15251 - std.datetime bug with -inline


Compare: https://github.com/D-Programming-Language/dmd/compare/0e79ca0c64a8...1b21ea368938


More information about the dmd-internals mailing list