https://issues.dlang.org/show_bug.cgi?id=17380
Issue ID: 17380
Summary: [REG 2.074.0] Compiler segfaults on undefined symbol
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Created attachment 1645
--> https://issues.dlang.org/attachment.cgi?id=1645&action=edit
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.
--