revealed by compiling https://github.com/msoucy/dproto
with
> -w -lib -inline -O -release -boundscheck=off
dmd returns
> 7239 Segmentation Error
Comment #1 by r.sagitario — 2015-10-28T08:08:51Z
On windows dmd doesn't stop compiling (or I didn't wait long enough).
Here's a reduced test case:
struct MessageType {
MessageType[] messageTypes;
const void toString1(scope void delegate(const(char)[]) sink)
{
messageTypes[0].toString1(sink);
}
}
struct ProtoPackage {
MessageType[] messageTypes;
const void toString1(scope void delegate(const(char)[]) sink)
{
messageTypes[0].toString1(sink);
}
}
dmd -inline -c test.d
Comment #2 by schuetzm — 2015-10-28T10:51:44Z
(In reply to Rainer Schuetze from comment #1)
> On windows dmd doesn't stop compiling (or I didn't wait long enough).
I can confirm this on Linux with your test case.
Digger traced it back to this commit:
commit 74b2b22b3fc4dd5d19ab5d7b77e13393330c866a
Author: Daniel Murphy <[email protected]>
Date: Fri Sep 18 00:04:55 2015 +1000
dmd: Merge pull request #5092 from yebblies/dwarnings
https://github.com/D-Programming-Language/dmd/pull/5092
Remove dead code and deprecated syntax
Comment #3 by code — 2015-10-29T10:35:29Z
Seems to infinitely loop in InlineScanVisitor::inlineScan.