D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20044 - Compiler crash when using an opaque struct as template parameter
Summary: Compiler crash when using an opaque struct as template parameter
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, pull
Depends on:
Blocks:
 
Reported: 2019-07-13 00:32 UTC by Tristan Hume
Modified: 2020-03-21 03: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 Tristan Hume 2019-07-13 00:32:37 UTC
https://run.dlang.io/is/Nio6z1

Reduced crashing case:

import std.variant;
struct While(T) { T[] body; }
alias Stmt = Algebraic!(While!(This));

Doesn't occur with inline This[] or when referenced as T* or T*[] instead of T[].
Comment 1 Dlang Bot 2019-07-14 17:23:24 UTC
@Basile-z created dlang/dmd pull request #10173 "fix issue 20044 - Compiler crash when using an opaque struct as templ…" fixing this issue:

- fix issue 20044 - Compiler crash when using an opaque struct as template parameter

https://github.com/dlang/dmd/pull/10173
Comment 2 Dlang Bot 2019-07-15 02:05:37 UTC
dlang/dmd pull request #10173 "fix issue 20044 - Compiler crash when using an opaque struct as template parameter" was merged into stable:

- 8ad3f43068bbe7bfe9a05c8e6838f102ff027f55 by Basile Burg:
  fix issue 20044 - Compiler crash when using an opaque struct as template parameter

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