Bug 14371 – [CTFE] Binary assignment expression makes wrong result in compile-time

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-29T03:44:00Z
Last change time
2015-06-17T21:03:55Z
Keywords
CTFE, pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-03-29T03:44:54Z
Test case: int ctfetest() { int x; ++(x += 1); return x == 2; } void main() { enum v = ctfetest(); assert(v == ctfetest()); // should be ok, but doesn't }
Comment #1 by k.hara.pg — 2015-03-29T03:59:17Z
Comment #2 by github-bugzilla — 2015-03-30T14:57:09Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a3c841ed8d4141af227bd47cd75db1d687983af fix Issue 14371 - [CTFE] Binary assignment expression makes wrong result in compile-time https://github.com/D-Programming-Language/dmd/commit/686f01ddeb416981af2a9c22de48fa3d51fe27cc Merge pull request #4529 from 9rnsr/fix14371 Issue 14371 - [CTFE] Binary assignment expression makes wrong result in compile-time
Comment #3 by github-bugzilla — 2015-06-17T21:03:55Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a3c841ed8d4141af227bd47cd75db1d687983af fix Issue 14371 - [CTFE] Binary assignment expression makes wrong result in compile-time https://github.com/D-Programming-Language/dmd/commit/686f01ddeb416981af2a9c22de48fa3d51fe27cc Merge pull request #4529 from 9rnsr/fix14371