[Issue 15272] [2.069-rc2,inline] nothing written to output when -inline is set
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Nov 1 14:41:55 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15272
--- Comment #8 from bb.temp at gmx.com ---
(In reply to ag0aep6g from comment #7)
> Here's a reduction that segfaults reliably for me with -release -O -inline:
> ----
> extern(C) void* calloc(size_t, size_t) nothrow pure;
>
> void main()
> {
> {
> File file_;
> nop();
> }
>
> auto scache = StringCache(1);
> foreach (nodePointer; scache.buckets)
> {
> if (nodePointer !is null) new Object;
> }
> }
>
> struct File
> {
> ~this() {}
> }
>
> void nop() {}
>
> struct StringCache
> {
> this(size_t bucketCount)
> {
> buckets = (cast(void**) calloc(8, bucketCount))[0 .. bucketCount];
> }
>
> void*[] buckets;
> }
> ----
Yes that's it. Thx much for your patience.
--
More information about the Digitalmars-d-bugs
mailing list