digitalmars.D.bugs - [Issue 11224] New: Inlining stops NRVO
- d-bugmail puremagic.com (47/47) Oct 11 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11224
- d-bugmail puremagic.com (10/10) Oct 11 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11224
http://d.puremagic.com/issues/show_bug.cgi?id=11224 Summary: Inlining stops NRVO Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com Test code: ------------ extern(C) int printf(const char*, ...); struct S { this(int) { printf("ctor &this = %p\n", &this); } int num; } S foo() { S s = S(1); printf("foo &this = %p\n", &s); return s; } void main() { auto s = foo(); printf("main &this = %p\n", &s); } Output: ------------ $ dmd -run test ctor &this = 0012FE20 foo &this = 0012FE20 main &this = 0012FE20 ------------ $ dmd -inline -run test ctor &this = 0012FE1C foo &this = 0012FE1C main &this = 0012FE18 // variable is moved! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 11 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11224 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull https://github.com/D-Programming-Language/dmd/pull/2592 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 11 2013