[Issue 15272] [2.069-rc2,inline] nothing written to output when -inline is set
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Nov 2 03:42:37 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15272
--- Comment #10 from ag0aep6g at gmail.com ---
(In reply to ag0aep6g from comment #7)
> Here's a reduction that segfaults reliably for me with -release -O -inline:
> ----
[...]
> ----
Reduced a little further, showing that bucketCount gets corrupted:
----
import core.stdc.stdio: printf;
pragma(inline, false) void[] calloc_(size_t bc) nothrow pure
{
debug printf("%x\n", bc); /* prints "ffffffff", should print "1" */
return [];
}
void main()
{
{
File file_;
nop();
}
auto scache = StringCache(1);
}
struct File
{
~this() {}
}
void nop() {}
struct StringCache
{
this(size_t bucketCount)
{
buckets = calloc_(bucketCount)[0 .. bucketCount];
printf("");
}
void[] buckets;
}
----
--
More information about the Digitalmars-d-bugs
mailing list