[Issue 7130] NRVO Bug: Wrong Code With D'tor + Conditional Return
http://d.puremagic.com/issues/show_bug.cgi?id=7130 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Kenji Hara 2012-05-10 23:05:16 PDT --- (In reply to comment #0) > Both D'tors are called and the returned result lives at a different address > after being returned than before, as expected if not using NRVO. On the other > hand, no postblit being called for whichever struct is returned, as expected > if > using NRVO. The function 'doit' cannot NRVO, because &s1 and &s2 should have different addresses. S doIt(int i) { S s1; S s2; printf("s1 lives at %p.\n", &s1); printf("s2 lives at %p.\n", &s2); return (i == 42) ? s1 : s2; // postblit should run } I'll make this a dup of bug 7516. I have posted more better test code in there. *** This issue has been marked as a duplicate of issue 7516 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7516] Postblit not called for structs returned from a ternary operator
http://d.puremagic.com/issues/show_bug.cgi?id=7516 Kenji Hara changed: What|Removed |Added CC||dsim...@yahoo.com --- Comment #4 from Kenji Hara 2012-05-10 23:05:16 PDT --- *** Issue 7130 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7516] Postblit not called for structs returned from a ternary operator
http://d.puremagic.com/issues/show_bug.cgi?id=7516 --- Comment #3 from Kenji Hara 2012-05-10 22:56:59 PDT --- Test cases: void main() { static struct S { int val; this(int n) { val = n; } this(this) { val *= 3; } } // cond ? lvalue : lvalue S foo(bool f) { auto s1 = S(1), s2 = S(2); return f ? s1 : s2; } auto s1 = foo(true); assert(s1.val == 3); auto s2 = foo(false); assert(s2.val == 6); // cond ? rvalue : rvalue S bar(bool f) { return f ? S(1) : S(2); } auto s3 = bar(true); assert(s3.val == 1); auto s4 = bar(false); assert(s4.val == 2); // cond ? lvalue : rvalue S baz(bool f) { auto s1 = S(1); return f ? s1 : S(2); } auto s5 = baz(true); assert(s5.val == 3); auto s6 = baz(false); assert(s6.val == 2); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7506] Postblit does not called properly with inlining
http://d.puremagic.com/issues/show_bug.cgi?id=7506 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #2 from Kenji Hara 2012-05-10 22:52:52 PDT --- https://github.com/D-Programming-Language/dmd/pull/939 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7530] Postblit not called structs returned from an array index expr.
http://d.puremagic.com/issues/show_bug.cgi?id=7530 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #4 from Kenji Hara 2012-05-10 22:53:11 PDT --- https://github.com/D-Programming-Language/dmd/pull/939 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8064] return reference semantics not obeyed on delegates?
http://d.puremagic.com/issues/show_bug.cgi?id=8064 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8081] pure nothrow unittest problem in generated 'header' file
http://d.puremagic.com/issues/show_bug.cgi?id=8081 --- Comment #1 from github-bugzi...@puremagic.com 2012-05-10 20:20:57 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/4cda59a17779bbdbd645c7772771cdccdbcc2df2 Fix build breakage due to bug# 8081. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8064] return reference semantics not obeyed on delegates?
http://d.puremagic.com/issues/show_bug.cgi?id=8064 --- Comment #3 from github-bugzi...@puremagic.com 2012-05-10 20:00:23 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5a9b927ae2501aac795c03d1cd6be79188e1e197 fix Issue 8064 - return reference semantics not obeyed on delegates? https://github.com/D-Programming-Language/dmd/commit/813a0216b2a205fb06bd8d02d7c667317c7b5ce4 Merge pull request #933 from 9rnsr/fix8064 Issue 8064 - return reference semantics not obeyed on delegates? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6257] Struct postblit not called in one case
http://d.puremagic.com/issues/show_bug.cgi?id=6257 --- Comment #2 from Kenji Hara 2012-05-10 19:53:28 PDT --- Sorry, I missed. This is a dup of bug 6199. *** This issue has been marked as a duplicate of issue 6199 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6199] [GSoC] Postblit not called when returning a reference to a by-value function.
http://d.puremagic.com/issues/show_bug.cgi?id=6199 Kenji Hara changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #5 from Kenji Hara 2012-05-10 19:53:28 PDT --- *** Issue 6257 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6257] Struct postblit not called in one case
http://d.puremagic.com/issues/show_bug.cgi?id=6257 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Kenji Hara 2012-05-10 19:52:21 PDT --- The bug mechanism is: struct Foo { int[] data; this(int n) { data.length = n; } this(this) { data = data.dup; } // Implicitly generated by compiler ref Foo opAssign(Foo rhs) { ... } } void main() { ... f1 = f2 = Foo(1); // is translated to: f1.opAssign(f2.opAssign(Foo(1))); // f2.opAssign returns ref Foo } "Postblit not called on ref returned object" is same as bug 6119. Then, this was a dup of it. *** This issue has been marked as a duplicate of issue 6119 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6119] Assertion failure: '0' on line 1118 in file 'glue.c'
http://d.puremagic.com/issues/show_bug.cgi?id=6119 Kenji Hara changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #2 from Kenji Hara 2012-05-10 19:52:21 PDT --- *** Issue 6257 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7530] Postblit not called structs returned from an array index expr.
http://d.puremagic.com/issues/show_bug.cgi?id=7530 Kenji Hara changed: What|Removed |Added CC||johnaston@gmail.com --- Comment #3 from Kenji Hara 2012-05-10 19:38:30 PDT --- *** Issue 7541 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7541] Postblit not called when returning from an array of structs.
http://d.puremagic.com/issues/show_bug.cgi?id=7541 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Comment #1 from Kenji Hara 2012-05-10 19:38:30 PDT --- *** This issue has been marked as a duplicate of issue 7530 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7530] Postblit not called structs returned from an array index expr.
http://d.puremagic.com/issues/show_bug.cgi?id=7530 --- Comment #2 from Kenji Hara 2012-05-10 19:38:07 PDT --- Reduced test case: void main() { static struct S { int val; this(int n) { val = n; } this(this) { val *= 3; } } S[] sa = new S[](1); sa[0].val = 1; S foo() { return sa[0]; // postblit should run } auto s = foo(); assert(s.val == 3); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8081] New: pure nothrow unittest problem in generated 'header' file
http://d.puremagic.com/issues/show_bug.cgi?id=8081 Summary: pure nothrow unittest problem in generated 'header' file Product: D Version: D2 Platform: x86 OS/Version: All Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2012-05-10 17:20:55 PDT --- A problem shown in the latest DMD2.060alpha, in the file: ...\dmd2\src\druntime\src\core\atomic.d ...\druntime\import\core\atomic.di A D2 test program: version(unittest) { pure nothrow unittest {} pure nothrow unittest {} } void main() {} Using: dmd -H test.d It generates this, that seems wrong: // D import file generated from 'test.d' version (unittest) { nothrow pure nothrow pure } void main() { } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8075] Optional parameters should be able to refer to previous parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8075 --- Comment #2 from wfunct...@hotmail.com 2012-05-10 15:12:23 PDT --- Also, not sure if this is a related or a separate issue, but we should also be able to refer to "this" object inside the optional arguments... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8059] Deprecate .classinfo
http://d.puremagic.com/issues/show_bug.cgi?id=8059 --- Comment #6 from Marco Leise 2012-05-10 14:09:07 PDT --- Ah, thank you for that hint. So my code would survive the deprecation, if just by chance. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8059] Deprecate .classinfo
http://d.puremagic.com/issues/show_bug.cgi?id=8059 --- Comment #5 from Steven Schveighoffer 2012-05-10 14:05:00 PDT --- Also see above referenced bug 3346 that specifically identifies classinfo as behaving abnormally. Looks like you found another case! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8059] Deprecate .classinfo
http://d.puremagic.com/issues/show_bug.cgi?id=8059 --- Comment #4 from Steven Schveighoffer 2012-05-10 14:02:39 PDT --- (In reply to comment #3) > // lookup[Trigger] = typeid(this); <- 'this' is only defined in > non-static member functions, not _staticCtor13 typeid(typeof(this)) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8066] ICE on missing return statement if invariant is present
http://d.puremagic.com/issues/show_bug.cgi?id=8066 Trass3r changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8080] New: 'alias this' causes toString to be shadowed by aliased object
http://d.puremagic.com/issues/show_bug.cgi?id=8080 Summary: 'alias this' causes toString to be shadowed by aliased object Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: hst...@quickfur.ath.cx --- Comment #0 from hst...@quickfur.ath.cx 2012-05-10 13:00:39 PDT --- Code: struct S { short[4] data; alias this data; string toString() { ... } } ... S s; writeln(to!string(s)); In dmd 2.059 (I believe) and earlier, this calls S.toString(). However, in git dmd, this calls data.toString() instead. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8066] ICE on missing return statement if invariant is present
http://d.puremagic.com/issues/show_bug.cgi?id=8066 --- Comment #2 from github-bugzi...@puremagic.com 2012-05-10 12:53:48 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ad9e8e6ded41180b01ae8ff4460ce066a78cad93 fix Issue 8066 - ICE on missing return statement if invariant is present https://github.com/D-Programming-Language/dmd/commit/fefeed478ab3a201afe2536c8a4734df92228187 Merge pull request #934 from 9rnsr/fix8066 Issue 8066 - ICE on missing return statement if invariant is present -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8079] Memory corruption on stack-allocated temporary static arrays
http://d.puremagic.com/issues/show_bug.cgi?id=8079 --- Comment #1 from hst...@quickfur.ath.cx 2012-05-10 12:11:18 PDT --- P.S. Changing the static array to int[4] for some reason makes the problem go away. Don't know how this is relevant, but might be useful to track down the bug in the compiler. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8059] Deprecate .classinfo
http://d.puremagic.com/issues/show_bug.cgi?id=8059 Marco Leise changed: What|Removed |Added CC||marco.le...@gmx.de --- Comment #3 from Marco Leise 2012-05-10 12:03:05 PDT --- typeid(x) doesn't work in all cases where x.classinfo works (on 2.057/2.059). Something along the line of: TypeInfo_Class[string] lookup; class Foo { mixin Register!("foo"); } template Register(string Trigger) { static this() { lookup[Trigger] = this.classinfo; // ok // lookup[Trigger] = typeid(this); <- 'this' is only defined in non-static member functions, not _staticCtor13 } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8079] New: Memory corruption on stack-allocated temporary static arrays
http://d.puremagic.com/issues/show_bug.cgi?id=8079 Summary: Memory corruption on stack-allocated temporary static arrays Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: hst...@quickfur.ath.cx --- Comment #0 from hst...@quickfur.ath.cx 2012-05-10 12:00:55 PDT --- Code: import std.stdio; struct S { short[4] x; this(short[4] args...) { x[] = args[]; } bool opEquals(in S s) const { for (auto i=0; i < 4; i++) { if (this.x[i] != s.x[i]) return false; } return true; } } void main() { assert(S(1,2,3,4) == S(1,2,3,4)); } Output: with dmd -m64, the assertion fails. Inserting writeln's show that the elements of s in opEquals() are garbage values. Trying to print out the entire array of this or s causes a segfault. On dmd -m32, there is no problem. Not sure if this is related to bug 5570. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5809] [64 bit] wrong code for *p==0, when widening conversion occurs
http://d.puremagic.com/issues/show_bug.cgi?id=5809 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8069] incorrect ambiguous virtual function error
http://d.puremagic.com/issues/show_bug.cgi?id=8069 --- Comment #2 from github-bugzi...@puremagic.com 2012-05-10 11:16:48 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bf20549ba21b031e9c3cc86c87090401833a1435 fix Issue 8069 - incorrect ambiguous virtual function error https://github.com/D-Programming-Language/dmd/commit/f35c12ade4edda65a4407311e8f7fab3d6da3c28 Merge pull request #935 from 9rnsr/fix8069 Issue 8069 - incorrect ambiguous virtual function error -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8032] `mixin template` before virtual method with same method causes an error
http://d.puremagic.com/issues/show_bug.cgi?id=8032 --- Comment #3 from github-bugzi...@puremagic.com 2012-05-10 11:16:51 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/634453fc73909ee83d718e884604aa58d76c96ee fix Issue 8032 test, for order independence -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5809] [64 bit] wrong code for *p==0, when widening conversion occurs
http://d.puremagic.com/issues/show_bug.cgi?id=5809 --- Comment #9 from github-bugzi...@puremagic.com 2012-05-10 10:05:33 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7c2ea37c476a2d7a289f54cbf1ee0e692d7a69a0 Fix issue 5809: [64 bit] wrong code for *p==0, when widening conversion occurs Bug was introduced in commit 3cdb9f52, but it never worked on 64bits, so it is not a regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5809] [64 bit] wrong code for *p==0, when widening conversion occurs
http://d.puremagic.com/issues/show_bug.cgi?id=5809 --- Comment #8 from Don 2012-05-10 07:22:16 PDT --- Fixed pull request. https://github.com/D-Programming-Language/dmd/pull/938 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5809] [64 bit] wrong code for *p==0, when widening conversion occurs
http://d.puremagic.com/issues/show_bug.cgi?id=5809 --- Comment #7 from Don 2012-05-10 07:02:10 PDT --- My pull request is wrong. The correct fix is in cgcod.c, line 1795. In moving to 64 bit, commit 3cdb9f520e0bac17f6da00ef9de86c81e23429aa made this change: c = genc(NULL,0x81 ^ byte,modregrm(2,7,BPRM), FLcs,i, FLconst,(targ_uns) 0); -if (REGSIZE == 4 && sz == 2) +if (I32 && sz == 2) c->Iflags |= CFopsize; } But this is wrong, it should be +if ((I32 || I64) && sz == 2) This code is now in cod3.c, testcse(), line 1795. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8075] Optional parameters should be able to refer to previous parameters
http://d.puremagic.com/issues/show_bug.cgi?id=8075 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #1 from Steven Schveighoffer 2012-05-10 04:58:18 PDT --- I really like this idea. But there must be a provision that the expression isn't substituted wholesale. For instance, your example should not expand to: process([1, 2, 3], [1, 2, 3].length); which allocates *twice*, the second time just to get the length. It should really expand to this: auto items = [1, 2, 3]; process(items, items.length); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8078] New: receiveOnly should tell which type it expected and got on mismatch
http://d.puremagic.com/issues/show_bug.cgi?id=8078 Summary: receiveOnly should tell which type it expected and got on mismatch Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic 2012-05-10 02:45:37 PDT --- import std.concurrency; void test() { receiveOnly!string(); } void main() { auto tid = spawn(&test); tid.send(1); } std.concurrency.MessageMismatch@std\concurrency.d(235): Unexpected message type Which type was expected? And which type did it receive? This needs to be part of the error message.. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5809] [64 bit] wrong code for *p==0, when widening conversion occurs
http://d.puremagic.com/issues/show_bug.cgi?id=5809 Don changed: What|Removed |Added Keywords||pull --- Comment #6 from Don 2012-05-10 00:53:24 PDT --- https://github.com/D-Programming-Language/dmd/pull/937 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---