Compiling the following code segfaults dmd 2.092.0:
struct S {
ubyte[1024 * 1024] a = void;
}
void main() {
version (works) {
S s;
} else {
auto s = S(); // Fails
}
}
Compile it with `-version=works' and now it compiles fine.
Array size does matter. You may have to use a different size to duplicate.
Perhaps related to https://issues.dlang.org/show_bug.cgi?id=17874
Ali
Comment #1 by b2.temp — 2023-01-08T19:53:10Z
that's a stack overflow in
outelem(elem*, bool&) (e=0x7216de0, addressOfParam=@0x7fffffffc8a0: false)
at src/dmd/backend/out.d:812