D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16598 - [REG2.069] ICE with void ternary + finalizers
Summary: [REG2.069] ICE with void ternary + finalizers
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2016-10-05 23:31 UTC by Vladimir Panteleev
Modified: 2017-01-16 23:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2016-10-05 23:31:58 UTC
//////////// test.d ///////////
struct S
{
    this(int) {}
    ~this() {}
}

int g(S a, S b)
{
    return 1;
}

void main()
{
    true ? g(S(), S(1)) : {}();
}
///////////////////////////////

Produces:

Internal error: backend/cod1.c 1654

Introduced in https://github.com/D-Programming-Language/dmd/pull/5003
Comment 1 Citrus 2017-01-12 20:50:58 UTC
Covered by DMD's PR https://github.com/dlang/dmd/pull/6434
Comment 2 github-bugzilla 2017-01-14 19:55:05 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/b6ac3bae6fe21fd5c060e9f8bad99e2d28e882a6
Fix issue 16598 - Explicitly discard the exp. value in void CondExp

https://github.com/dlang/dmd/commit/f7dc4fdc6a3a776a4bc4499fa2edf305f2c3a19d
Merge pull request #6434 from LemonBoy/b16598

Fix issue 16598 - Explicitly discard the exp. value in void CondExp
Comment 3 github-bugzilla 2017-01-15 01:21:07 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/b6ac3bae6fe21fd5c060e9f8bad99e2d28e882a6
Fix issue 16598 - Explicitly discard the exp. value in void CondExp

https://github.com/dlang/dmd/commit/f7dc4fdc6a3a776a4bc4499fa2edf305f2c3a19d
Merge pull request #6434 from LemonBoy/b16598
Comment 4 github-bugzilla 2017-01-16 23:26:36 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/b6ac3bae6fe21fd5c060e9f8bad99e2d28e882a6
Fix issue 16598 - Explicitly discard the exp. value in void CondExp

https://github.com/dlang/dmd/commit/f7dc4fdc6a3a776a4bc4499fa2edf305f2c3a19d
Merge pull request #6434 from LemonBoy/b16598