Bug 17690 – [REG2.066.0] scope guards leak declarations

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-26T00:28:18Z
Last change time
2017-08-16T13:23:55Z
Keywords
accepts-invalid, ice
Assigned to
No Owner
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2017-07-26T00:28:18Z
--- void main(){ scope(exit) int x=3; assert(x==3); } --- --- Internal error: ddmd/backend/symbol.c 1040 --- The problem is that the parser passes PScurlyscope instead of PSscope when parsing the scope guard statement.
Comment #1 by dlang-bugzilla — 2017-07-26T10:43:34Z
The front-end accepts it without error. This seems to be a regression. Introduced in https://github.com/dlang/dmd/pull/3564
Comment #2 by bugzilla — 2017-08-07T03:38:07Z
Comment #3 by github-bugzilla — 2017-08-07T04:16:52Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/978490aca27e374141607369389f6694d78af182 fix Issue 17690 - scope guards leak declarations https://github.com/dlang/dmd/commit/5049277bb3f48c19cc7327c0db40c5097ba35f62 Merge pull request #7026 from tgehr/fix17690 fix Issue 17690 - scope guards leak declarations merged-on-behalf-of: Walter Bright <[email protected]>
Comment #4 by github-bugzilla — 2017-08-07T13:17:34Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/978490aca27e374141607369389f6694d78af182 fix Issue 17690 - scope guards leak declarations https://github.com/dlang/dmd/commit/5049277bb3f48c19cc7327c0db40c5097ba35f62 Merge pull request #7026 from tgehr/fix17690
Comment #5 by github-bugzilla — 2017-08-16T13:23:55Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/978490aca27e374141607369389f6694d78af182 fix Issue 17690 - scope guards leak declarations https://github.com/dlang/dmd/commit/5049277bb3f48c19cc7327c0db40c5097ba35f62 Merge pull request #7026 from tgehr/fix17690