| Thread overview | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
November 09, 2018 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 Mr. Smith <mrsmith33@yandex.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Address of stack temporary |[Codegen] Address of stack |is returned |temporary is returned -- | ||||
November 09, 2018 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 ag0aep6g <ag0aep6g@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |ag0aep6g@gmail.com -- | ||||
August 29, 2020 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |backend CC| |bugzilla@digitalmars.com -- | ||||
September 06, 2020 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86_64 |All --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> --- This problem happens on 32 bit code, too. Slightly reduced test case: void main() { Vec preds = Vec(0xDEAD); void* ptr2 = &preds.august(); assert(&preds == ptr2); } struct Vec { uint item; ref uint august() { return item; // commenting next line removes bug foreach(ref val; range()) return val; assert(false); } } struct range { int opApply(scope int delegate(ref uint) dg) { return 0; } } -- | ||||
September 06, 2020 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 --- Comment #2 from Walter Bright <bugzilla@digitalmars.com> --- Replace the `ref uint` return with a `uint*` pointer and it works. So, the problem must be in the logic that treats a pointer return, but not a ref return. -- | ||||
September 07, 2020 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> --- @WalterBright created dlang/dmd pull request #11701 "fix Issue 19384 - [Codegen] Address of stack temporary is returned" fixing this issue: - fix Issue 19384 - [Codegen] Address of stack temporary is returned https://github.com/dlang/dmd/pull/11701 -- | ||||
September 07, 2020 [Issue 19384] [Codegen] Address of stack temporary is returned | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19384 Dlang Bot <dlang-bot@dlang.rocks> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> --- dlang/dmd pull request #11701 "fix Issue 19384 - [Codegen] Address of stack temporary is returned" was merged into master: - d8d294f38676f98bedef7d069746532e6f6c2c64 by Walter Bright: fix Issue 19384 - [Codegen] Address of stack temporary is returned https://github.com/dlang/dmd/pull/11701 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply