Bug 13977 – Front-end optimizer bug in AndAndExp

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-13T13:54:00Z
Last change time
2015-02-18T03:42:35Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-01-13T13:54:43Z
Compiling with version=B and version=D should have consistent runtime behavior, but doesn't. bool cond(bool b) { return b; } void main() { version(A) cond(true) && assert(0); // asserts in runtime, ok version(B) cond(false) && assert(0); // no assert, ok version(C) true && assert(0); // assert in runtime, ok version(D) false && assert(0); // asserts in runtime, why? }
Comment #1 by k.hara.pg — 2015-01-13T14:43:35Z
Comment #2 by github-bugzilla — 2015-01-14T04:40:28Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f8c9340d409cf66eb7994f3efa3902c5de414596 fix Issue 13977 - Front-end optimizer bug in AndAndExp https://github.com/D-Programming-Language/dmd/commit/c94c5e59b9903cf545869ce76fd13ebb7016f084 Merge pull request #4295 from 9rnsr/fix_optimizer Issue 13977 & 13978 - Fix front-end optimizer bug
Comment #3 by github-bugzilla — 2015-02-18T03:42:35Z