Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 24, 2015 [Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14220 Rainer Schuetze <r.sagitario@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #1 from Rainer Schuetze <r.sagitario@gmx.de> --- 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. -- |
February 25, 2015 [Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14220 Ketmar Dark <ketmar@ketmar.no-ip.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ketmar@ketmar.no-ip.org --- Comment #2 from Ketmar Dark <ketmar@ketmar.no-ip.org> --- just in case: it's ok with GNU/Linux, x86. so this seems to be 64-bit issue. -- |
February 27, 2015 [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 <k.hara.pg@gmail.com> --- 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. -- |
February 28, 2015 [Issue 14220] Bad codegen for optimized std.conv.text in combination with concatenation | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14220 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com --- Comment #4 from Walter Bright <bugzilla@digitalmars.com> --- I'll check it out. -- |
February 28, 2015 [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 <bugzilla@digitalmars.com> --- Can repro on Win64 with the switches: -m64 -O -release -- |
March 01, 2015 [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 <bugzilla@digitalmars.com> --- https://github.com/D-Programming-Language/dmd/pull/4451 -- |
March 01, 2015 [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-bugzilla@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... -- |
March 28, 2015 [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-bugzilla@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... -- |
April 11, 2015 [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-bugzilla@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 -- |
June 17, 2015 [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-bugzilla@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 -- |
Copyright © 1999-2021 by the D Language Foundation