[Issue 17409] New: [ICE] Segmentation fault with invalid code and -dip1000
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu May 18 05:45:20 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17409
Issue ID: 17409
Summary: [ICE] Segmentation fault with invalid code and
-dip1000
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: safe
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: mathias.lang at sociomantic.com
The following code:
```
void main () @safe
{
scope void delegate (void*) @safe s = (a) {};
scope void* ptr;
s(ptr);
}
```
Compiles correctly with `dmd test.d` and segfault when compiler with `dmd
-dip1000 test.d`. I would expect compilation to fail as it attempts to pass a
`scope void*` to a delegate accepting `void*`.
Tested with 2.074 and master (v2.075.0-devel-f234dde37).
--
More information about the Digitalmars-d-bugs
mailing list