October 10, 2021 [Issue 22374] New: [REG 2.093] 'import std;' with -checkaction=context causes link error | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22374 Issue ID: 22374 Summary: [REG 2.093] 'import std;' with -checkaction=context causes link error Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: snarwin+bugzilla@gmail.com As of DMD 2.097.2, compiling the following program with the flag `-checkaction=context` results in a linker error. --- import std; void main() { assert(0); } --- The error is: --- /usr/bin/ld: bug.o: in function `_Dmain': bug.d:(.text._Dmain[_Dmain]+0x33): undefined reference to `_D4core8internal7dassert__T14_d_assert_failTiZQtFNaNbNiNfMxAyaxiZAya' collect2: error: ld returned 1 exit status Error: linker exited with status 1 --- Demangled: --- /usr/bin/ld: bug.o: in function `_Dmain': bug.d:(.text._Dmain[_Dmain]+0x33): undefined reference to `pure nothrow @nogc @safe immutable(char)[] core.internal.dassert._d_assert_fail!(int)._d_assert_fail(scope const(immutable(char)[]), const(int))' collect2: error: ld returned 1 exit status Error: linker exited with status 1 --- Removing the line `import std;`, or changing it to import a different module such as `std.range`, causes the program to compile and link successfully. According to run.dlang.io, this is a regression introduced in DMD 2.093. -- |
Copyright © 1999-2021 by the D Language Foundation