(This bug report is for dmd 1.061)
This code:
extern (C) void abort();
struct X {
union {
void[] a;
void[a.sizeof] b;
}
}
void foo(X b) {
abort();
}
void main() {
foo(X.init);
}
Makes gdb output "Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x68 [in module /tmp/test/dr]" when the abort() jumps back into the debugger, and you request a stacktrace with "bt".
I suspect something is wrong with static void[] arrays.
Comment #1 by robert — 2010-05-20T12:21:57Z
Test case is for D1, with D2 it fails with an error that has no line number information. Reduced test case for D2:
----
void[8] foo = void;
void main(){}
----