[Issue 12345] byLine.popFront() fails with 'Internal error: backend/cod2.c 2200' when compiled with '-inline' switch
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 9 01:00:31 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12345
--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> ---
A shrunken test case that reproduces same internal error in win32.
void main()
{
ByLine!()().popFront();
}
struct ByLine()
{
RefCounted!(ByLineImpl!()) impl;
void popFront()
{
impl._refCounted._store._payload.popFront();
}
}
private struct ByLineImpl()
{
char[] line;
void popFront()
{
if (line.length == 0)
{
line = null;
}
else if (line.length == 0 ? false : line[$-1] == '\n')
{
line = line.ptr[0 .. line.length - 1];
}
}
}
struct RefCounted(T)
{
struct RefCountedStore
{
private struct Impl
{
T _payload;
}
private Impl* _store;
}
RefCountedStore _refCounted;
~this() {}
}
--
More information about the Digitalmars-d-bugs
mailing list