Thread overview | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 26, 2015 [Issue 14829] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 Martin Nowak <code@dawg.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code@dawg.eu --- Comment #1 from Martin Nowak <code@dawg.eu> --- Oh, this might be difficult to fix. The compiler leaves out the int[] s = str.save; code and uses the same variable for s and str. -- |
July 27, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|wrong code with -O -inline |[REG2.066.0] wrong code | |with -O -inline --- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> --- It's a regression from 2.066.0. Introduced in: https://github.com/D-Programming-Language/dmd/pull/3819 -- |
July 27, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |regression -- |
July 27, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@digitalmars.com --- Comment #3 from Walter Bright <bugzilla@digitalmars.com> --- Thanks, guys, for reducing it and for finding which PR caused it. Looks like the ball is in my court. -- |
July 27, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 --- Comment #4 from Walter Bright <bugzilla@digitalmars.com> --- Somewhat smaller test case that only requires -O to fail: int decodeImpl(int[] str) { return 1; } int[] stripLeft(int[] str) { while (true) { int[] a = str; int[] s = a; int dc = decodeImpl(str); str = str[1 .. $]; bool w = dc != 1; if (!w) return s; } } void main () { int[1] a = 2; assert (stripLeft(a)[0] == 2); // fails with -O } -- |
July 27, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 --- Comment #5 from Walter Bright <bugzilla@digitalmars.com> --- Even smaller: int stripLeft(int str, int dc) { while (true) { int a = str; int s = a; str += 1; if (dc) return s; } } void main () { assert (stripLeft(3, 1) == 3); // fails with -O } -- |
July 27, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 --- Comment #6 from Walter Bright <bugzilla@digitalmars.com> --- https://github.com/D-Programming-Language/dmd/pull/4841 -- |
July 28, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 --- 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/bc2ae82f62fa1df91040c874542e8e6b9746178b fix Issue 14829 - [REG2.066.0] wrong code with -O -inline https://github.com/D-Programming-Language/dmd/commit/88bb355e8245c8fa6c1017a116cc8ea36c601a41 Merge pull request #4841 from WalterBright/fix14829 fix Issue 14829 - [REG2.066.0] wrong code with -O -inline -- |
July 28, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gassa@mail.ru --- Comment #8 from Walter Bright <bugzilla@digitalmars.com> --- *** Issue 14827 has been marked as a duplicate of this issue. *** -- |
July 28, 2015 [Issue 14829] [REG2.066.0] wrong code with -O -inline | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=14829 --- Comment #9 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/758561893df09001cc8a1d9b0352633087fb3793 fix Issue 14829 - [REG2.066.0] wrong code with -O -inline https://github.com/D-Programming-Language/dmd/commit/1dae1145eb63709586c65902f5bdd44b01c42479 Merge pull request #4842 from 9rnsr/fix14829 Cherry-pick issue 14829 fix from master branch -- |
Copyright © 1999-2021 by the D Language Foundation