Created attachment 1645 [details] Source file demonstrating the bug. Compiling the attached source with dmd -unittest -main bug.d, dmd segfaults. When line 88 is replaced by line 89 then it compiles and links. The culprit is an undefined symbol: Uint128 opCast(T : Uint128)() { return ThisTypeDoesNotExistsAndCrahesTheCompiler(v); } Changing to Uint128 opCast(T : Uint128)() { return Uint128(0); } dmd does not crash.
(In reply to kai from comment #0) > Created attachment 1645 [details] > Source file demonstrating the bug. Reduced: ---- struct Int128 { Uint128 opCast() { return ThisTypeDoesNotExistsAndCrahesTheCompiler; } alias opCast this; } struct Uint128 { Int128 opCast() { return Int128.init; } alias opCast this; } ---- Neither this reduction nor the original code compile for me with dmd 2.073.2. So this doesn't seem like a regression in 2.074 to me.
I don't think it is a regression, either. https://github.com/dlang/dmd/pull/6969
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a583f97e3c99d91c499da6c3c3f22e810a5890d8 fix Issue 17380 - [REG 2.074.0] Compiler segfaults on undefined symbol https://github.com/dlang/dmd/commit/e0223539bbdd6e0aef749ba93435c9144635d5f6 Merge pull request #6969 from WalterBright/fix17380 fix Issue 17380 - Compiler segfaults on undefined symbol
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a583f97e3c99d91c499da6c3c3f22e810a5890d8 fix Issue 17380 - [REG 2.074.0] Compiler segfaults on undefined symbol https://github.com/dlang/dmd/commit/e0223539bbdd6e0aef749ba93435c9144635d5f6 Merge pull request #6969 from WalterBright/fix17380
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a583f97e3c99d91c499da6c3c3f22e810a5890d8 fix Issue 17380 - [REG 2.074.0] Compiler segfaults on undefined symbol https://github.com/dlang/dmd/commit/e0223539bbdd6e0aef749ba93435c9144635d5f6 Merge pull request #6969 from WalterBright/fix17380
*** Issue 6523 has been marked as a duplicate of this issue. ***
*** Issue 9327 has been marked as a duplicate of this issue. ***