Bug 16022 – [REG2.069] dmd assertion failure due to misplaced comma operator

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-13T18:42:40Z
Last change time
2017-12-18T22:57:25Z
Keywords
ice, pull
Assigned to
No Owner
Creator
Sebastiaan Koppe

Comments

Comment #0 by mail — 2016-05-13T18:42:40Z
I changed something in my code to: bool foo() { return ( token.type == Type.Colon, // Typo: wanted logical operator instead of comma token.type == Type.Comma); } And I suddenly got this back from dmd: linkage = 0 Assertion failed: (0), function visit, file tocsym.c, line 246. dmd failed with exit code -6. In the function foo I wanted to type || instead of the comma. Regardless, it shouldn't fail with an assertion.
Comment #1 by ag0aep6g — 2016-05-13T18:50:30Z
Complete test case: ---- enum Type {Colon, Comma} Type type; bool foo() { return type == Type.Colon, type == Type.Comma; } ---- Compiles with 2.068. Fails with ICE since 2.069.
Comment #2 by k.hara.pg — 2016-05-13T22:24:40Z
Comment #3 by github-bugzilla — 2016-05-14T20:54:14Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/dd3e980ca418b15d0e508ed3506276040f71e774 fix Issue 16022 - dmd assertion failure due to misplaced comma operator https://github.com/dlang/dmd/commit/35190b070e3dee5ba0ba07533a0a9f476b20ffa4 Merge pull request #5774 from 9rnsr/fix16022 [REG2.069] Issue 16022 - dmd assertion failure due to misplaced comma operator
Comment #4 by github-bugzilla — 2016-05-16T02:51:32Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/dd3e980ca418b15d0e508ed3506276040f71e774 fix Issue 16022 - dmd assertion failure due to misplaced comma operator https://github.com/dlang/dmd/commit/35190b070e3dee5ba0ba07533a0a9f476b20ffa4 Merge pull request #5774 from 9rnsr/fix16022
Comment #5 by github-bugzilla — 2017-11-20T08:41:55Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/64980c29006945d9b0a5abbe096edd2c92913584 Issue 16022 - assertion failure due to misplaced comma operator (additional test) https://github.com/dlang/dmd/commit/f6c2fbf2925326f47809eda4a999b8722d12d547 Merge pull request #7338 from JinShil/fix_16022 Issue 16022 - assertion failure due to misplaced comma operator (additional test) merged-on-behalf-of: Iain Buclaw <[email protected]>
Comment #6 by github-bugzilla — 2017-12-18T22:57:25Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/64980c29006945d9b0a5abbe096edd2c92913584 Issue 16022 - assertion failure due to misplaced comma operator (additional test) https://github.com/dlang/dmd/commit/f6c2fbf2925326f47809eda4a999b8722d12d547 Merge pull request #7338 from JinShil/fix_16022