Compiling the code:
main.d
~~~~~~
import math.Matrix;
void main()
{
auto a = new Matrix44F();
Matrix44F.add(a, a);
}
math/Matrix.d
~~~~~~~~~~~~~
module math.Matrix;
class Matrix44F
{
static M add(M)(M a, M b);
}
produces the following DMD output:
Error 42: Symbol Undefined _D4math6Mбrix9х44F32__T3addTCЂ–ЎZЂ„ќFЂ—ќЂґЂ—
Looks like some internal data corruption takes place...
Changing nearly anything (return type value, number of arguments, module name etc.) makes problem disappear.
Comment #1 by 2korden — 2008-07-19T16:41:56Z
DMD1.029 gives correct error message, but DMD1.031+ doesn't so it's a regression and Windows only (thanks Christian).
Comment #2 by bugzilla — 2008-08-29T21:16:54Z
It isn't corrupt data. dmd will compress the identifiers when they get too long, you're seeing the compressed version (because the linker just spits out what it sees).
Comment #3 by 2korden — 2008-08-30T06:30:52Z
Ok, I agree that it's not a bug, but it is an annoying. There could be some mapping from a compressed name too full one, and linker should output correct mangled name. Its output supposed to be read by human, isn't it? It is supposed to help user in tracking the problem, not for confusing him.
Besides, showing external data in internal representation isn't very good as it breaks incapsulation :)
Comment #4 by 2korden — 2008-12-08T19:14:50Z
Bump! Just hit by this one again. How am I supposed to decypher (and fix) errors like:
Error 42: Symbol Undefined _D3stl4utiбcont6Vector40__TЂ‡ЊTC2ui7Ђ„ќrol7CяэZЂ‡Ґ9findFirstMFЂќ°SЂЖр8IteraЂѓ‰
Error 42: Symbol Undefined _D3stl4utiбcont6Vector40__TЂ‡ЊTC2ui7Ђ„ќrol7CяэZЂ‡Ґ3endMFZSЂЖО8IteraЂѓ‰
Comment #5 by s.d.hammett — 2009-08-25T11:06:20Z
Created attachment 441
Test case for unhelpful behaviour
Comment #6 by s.d.hammett — 2009-08-25T11:09:00Z
I think this is a bug.
dmd is hitting an error, outputting no error message, leaving behind a corrupt .obj and then just to add to the confusion is going on to run the link step, resulting in the erroneous linker errors.
This situation is less than ideal.
At the least dmd should exit with 'unknown error'.
Comment #7 by razvan.nitu1305 — 2019-10-10T14:56:33Z
This issue does not manifest in D2. Closing as WONTFIX.