[Issue 17969] New: dmd 2.077.0 crashes when computing mangling symbol for simple program
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 6 12:04:08 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17969
Issue ID: 17969
Summary: dmd 2.077.0 crashes when computing mangling symbol for
simple program
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: atila.neves at gmail.com
This code causes dmd 2.070.0 to crash:
void foo() {
struct Data {
double value;
}
oops([Data()]);
}
void oops(Data)(Data[] data) {
import std.algorithm: map;
auto values = [data].map!(a => a.map!(b => b.value).sum);
}
Earlier versions aren't affected. Notice that `sum` isn't imported. If it is,
the crash goes away. If `b.value` is replaced with `b.foo` (or any other name
that doesn't exist in the struct), it also crashes, so it seems to have to do
with the function failing to compile.
The stack trace points to
_ZN7Mangler14mangleFuncTypeEP12TypeFunctionS1_hP4Type.
--
More information about the Digitalmars-d-bugs
mailing list