D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19608 - [ICE] dmd/backend/cod1.d(3826): Assertion `0' failed.
Summary: [ICE] dmd/backend/cod1.d(3826): Assertion `0' failed.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2019-01-23 17:47 UTC by Iain Buclaw
Modified: 2019-03-10 13:56 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 Iain Buclaw 2019-01-23 17:47:40 UTC
Minimal test
---
import core.stdc.stdarg;
void f(int) {}
void g(...) {}
void h()
{
    g(*&f);
}
---

When ENABLE_RELEASE=1

Segmentation fault

When ENABLE_DEBUG=1

dmd: dmd/backend/cod1.d:3826: Assertion `0' failed.
Aborted
Comment 1 Iain Buclaw 2019-01-27 01:13:55 UTC
This is invalid code an error should be issued, similar to:

auto a = *&f;
Comment 2 github-bugzilla 2019-01-27 23:30:38 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/6bedb35e56584ebd3e2c7d597f2fc824ef442963
fix Issue 19608 - [ICE] dmd/backend/cod1.d(3826): Assertion `0' failed.

https://github.com/dlang/dmd/commit/895b3ee96c5cde92ef8a990c84de554a99b4a801
Merge pull request #9299 from ibuclaw/issue19608

fix Issue 19608 - [ICE] dmd/backend/cod1.d(3826): Assertion `0' failed.
merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
Comment 3 Dlang Bot 2019-03-10 13:56:35 UTC
dlang/dmd pull request #9437 "[dmd-cxx] fix Issue 19608 - [ICE] dmd/backend/cod1.d(3826): Assertion `0' failed." was merged into dmd-cxx:

- 7e517f18a3cfb49834d63d0c9e7b9d51a60a2e37 by Iain Buclaw:
  fix Issue 19608 - [ICE] dmd/backend/cod1.d(3826): Assertion `0' failed.

https://github.com/dlang/dmd/pull/9437