[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 Ketmar Dark changed: What|Removed |Added CC|ket...@ketmar.no-ip.org | --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #10 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9295312a23e85dcd1b026cf3b25feb0330379185 fix Issue 14220 - Bad codegen for optimized std.conv.text in combination with concatenation https://github.com/D-Programming-Language/dmd/commit/e43136308f7eb035d046a99a46ffbdaf880413b7 Merge pull request #4451 from WalterBright/fix14220 --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #9 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f37749d65561cd019ae9b54ed8ee3474a54a6a6e Merge pull request #4451 from WalterBright/fix14220 --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #8 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f37749d65561cd019ae9b54ed8ee3474a54a6a6e Merge pull request #4451 from WalterBright/fix14220 fix Issue 14220 - Bad codegen for optimized std.conv.text in combination... --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9295312a23e85dcd1b026cf3b25feb0330379185 fix Issue 14220 - Bad codegen for optimized std.conv.text in combination with concatenation https://github.com/D-Programming-Language/dmd/commit/e43136308f7eb035d046a99a46ffbdaf880413b7 Merge pull request #4451 from WalterBright/fix14220 fix Issue 14220 - Bad codegen for optimized std.conv.text in combination... --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #6 from Walter Bright --- https://github.com/D-Programming-Language/dmd/pull/4451 --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #5 from Walter Bright --- Can repro on Win64 with the switches: -m64 -O -release --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #4 from Walter Bright --- I'll check it out. --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 --- Comment #3 from Kenji Hara --- Reduced test case: extern(C) int printf(const char*, ...); void main() { auto a = toString(14); printf("a.ptr = %p, a.length = %d\n", a.ptr, cast(int)a.length); return; } auto toString(int value) { uint mValue = value; char[int.sizeof * 3] buffer = void; size_t index = buffer.length; do { uint div = cast(int)(mValue / 10); char mod = mValue % 10 + '0'; buffer[--index] = mod;// Line 22 mValue = div; } while (mValue); //printf("buffer.ptr = %p, index = %d\n", buffer.ptr, cast(int)index); return dup(buffer[index .. $]); } char[] dup(char[] a) { //printf("a.ptr = %p, a.length = %d\n", a.ptr, cast(int)a.length); a[0] = 1; // segfault return a; } The wrong-code bug is introduced by the change: https://github.com/D-Programming-Language/dmd/pull/4415 However, the PR 4415 only affects to line 22. so I think the root issue would exist in dmd backend optimizer. --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 Ketmar Dark changed: What|Removed |Added CC||ket...@ketmar.no-ip.org --- Comment #2 from Ketmar Dark --- just in case: it's ok with GNU/Linux, x86. so this seems to be 64-bit issue. --
[Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation
https://issues.dlang.org/show_bug.cgi?id=14220 Rainer Schuetze changed: What|Removed |Added Keywords||wrong-code --- Comment #1 from Rainer Schuetze --- According to git-bisect this has been introduced with https://github.com/D-Programming-Language/dmd/pull/4408, so it is not in dmd 2.067 beta2. --