The following snippet segfaults DMD (and LDC) when using -checkaction=context: types.d -------------------- struct Tuple { bool opEquals(Tuple) { return true; } } void main() { Tuple t1; assert(t1 == t1); } -------------------- dmd -checkaction=context types.d => Segmentation fault (core dumped) This snippet is a reduced test case from std.typecons (which is currently only usable without this switch)
@wilzbach created dlang/dmd pull request #10270 "Fix Issue 20100 - Segfault with checkaction=context on struct comparison" fixing this issue: - Fix Issue 20100 - Segfault with checkaction=context on struct comparison https://github.com/dlang/dmd/pull/10270
@wilzbach created dlang/dmd pull request #10271 " -checkaction=context: improve struct equals detection" fixing this issue: - Fix Issue 20100 - Segfault with checkaction=context on struct comparison https://github.com/dlang/dmd/pull/10271
@wilzbach created dlang/druntime pull request #2720 "-checkaction=context: Improve struct output + add tests for issue 20100" mentioning this issue: - -checkaction=context: Improve struct output + add tests for issue 20100 https://github.com/dlang/druntime/pull/2720
dlang/dmd pull request #10270 "Fix Issue 20100 - Segfault with checkaction=context on struct comparison" was merged into master: - 769cca98a012f5cbdab14fd2bc5019ae650117a0 by Sebastian Wilzbach: Fix Issue 20100 - Segfault with checkaction=context on struct comparison https://github.com/dlang/dmd/pull/10270