when using -inline in 64 bit mode all apps I have the goto the web do not work. -m64 -inline on windows 10 64 bit Windows comes back with a message about debugging the app. Without -inline they work. compiler --> DMD32 D Compiler 2.075.0-b2
Please provide a full self-contained test case, so that we can reproduce the bug.
void main() { import std.stdio, std.base64, std.net.curl, std.string; const f = "http://rosettacode.org/favicon.ico".get.representation; Base64.encode(f).writeln; } ---- the above fails in -m32 or -m64 when using -inline -- without -inline they execute immediately.
(In reply to steven kladitis from comment #3) > ---- the above fails in -m32 or -m64 when using -inline Thanks, reprocuded. Reducing.
This is a regression. Introduced in https://github.com/dlang/dmd/pull/6852 Partial reduction: //////////////// test.d //////////////// void main() { import std.array : appender; auto content = appender!(ubyte[])(); auto rdg = () { auto x = content.data; }; content.put(new ubyte[912]); } ////////////////////////////////////////
Reduced: //////// test.d /////// struct S { int i; this(ubyte) { return; } void fun() { assert(i == 0); } } S make() { return S(0); } void main() { S s = make(); auto rdg = { s.fun(); }; s.fun(); } ///////////////////////
https://github.com/dlang/dmd/pull/7056
*** Issue 14793 has been marked as a duplicate of this issue. ***
*** Issue 17632 has been marked as a duplicate of this issue. ***
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c73fe970c2014058b9544524d1809180db13cfbb fix Issue 17622 - [REG2.075.0-b1] Wrong code with appender and -inline https://github.com/dlang/dmd/commit/17473d2e6248da9fbb746ed8314b0ee488961156 Merge pull request #7056 from WalterBright/fix17622 fix Issue 17622 - [REG2.075.0-b1] Wrong code with appender and -inline merged-on-behalf-of: Martin Nowak <code@dawg.eu>
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c73fe970c2014058b9544524d1809180db13cfbb fix Issue 17622 - [REG2.075.0-b1] Wrong code with appender and -inline https://github.com/dlang/dmd/commit/17473d2e6248da9fbb746ed8314b0ee488961156 Merge pull request #7056 from WalterBright/fix17622