[Issue 7248] New: [CTFE] Stack overflow on using struct filed pointer with address of array element
http://d.puremagic.com/issues/show_bug.cgi?id=7248 Summary: [CTFE] Stack overflow on using struct filed pointer with address of array element Product: D Version: D1 D2 Platform: Other OS/Version: Windows Status: NEW Keywords: ice-on-invalid-code Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: verylonglogin@gmail.com --- Comment #0 from Denis verylonglogin@gmail.com 2012-01-08 14:47:36 MSK --- --- struct S { S* ptr; } int f() { S[1] sarr; sarr[0].ptr = sarr[0]; sarr[0].ptr = null; // causes Stack overflow S* t = sarr[0].ptr; // Regression: ditto for head, works with 2.057 return 0; } enum e = f(); --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7187] Regression(head 12d62ca5): [CTFE] ICE on slicing
http://d.puremagic.com/issues/show_bug.cgi?id=7187 Denis verylonglogin@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #4 from Denis verylonglogin@gmail.com 2012-01-08 16:49:39 MSK --- If const cast and struct are added, with head commit (d2b8eadf): Assertion failure: '((ArrayLiteralExp *)se-e1)-ownedByCtfe' on line 6337 in file 'interpret.c' --- struct S { const(int)[] field; } const(int)[] f() { int[] arr = []; const(int)[] str = arr; auto s = S(str); return s.field; } int g(const(int)[] r) { auto t = r[0..0]; return 0; } static assert(g(f()) == 0); --- This affects Appender using with CTFE. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4475] Improving the compiler 'in' associative array can return just a bool
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #8 from bearophile_h...@eml.cc 2012-01-08 06:47:39 PST --- (In reply to comment #7) I don't see why pointers are so bad. While, yes, D is a high-level language, it is not C# or Java. Pointers are not evil, but they are usually more bug-prone. An example from simendsjo: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learnarticle_id=31482 aa[a] = new C(); auto c = a in aa; aa[b] = new C(); // Using c here is undefined as an element was added to aa This can't happen if in returns a bool. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3934] Some untidy attributes
http://d.puremagic.com/issues/show_bug.cgi?id=3934 --- Comment #25 from bearophile_h...@eml.cc 2012-01-08 07:09:32 PST --- By mleise on IRC #D: struct Foo { void bar() const const const {} } void main() {} -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3934] Some untidy attributes
http://d.puremagic.com/issues/show_bug.cgi?id=3934 --- Comment #26 from bearophile_h...@eml.cc 2012-01-08 07:22:14 PST --- By mleise on IRC #D: class Base { abstract void foo(); } class Ext : Base { override void foo(); // override should require an implementation } void main() {} If uncaught by the compiler this causes a linker error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7249] New: 2.058 regression: no size yet for forward reference when using this.init.tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7249 Summary: 2.058 regression: no size yet for forward reference when using this.init.tupleof Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: thecybersha...@gmail.com --- Comment #0 from Vladimir Panteleev thecybersha...@gmail.com 2012-01-08 10:09:34 PST --- struct S { int x; alias typeof(this.init.tupleof[0]) T; } This worked in 2.057, but doesn't work in DMD git head. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6364] Static struct's destructor called on exit of function
http://d.puremagic.com/issues/show_bug.cgi?id=6364 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #4 from Walter Bright bugzi...@digitalmars.com 2012-01-08 15:03:03 PST --- https://github.com/D-Programming-Language/dmd/commit/04e49317d79269c2ec30217562b97eaa6f9699a7 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7249] 2.058 regression: no size yet for forward reference when using this.init.tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7249 --- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-01-08 15:05:22 PST --- This causes by fixing bug 7190. I think this is similar problem like follows: struct S { int x; alias typeof(this.init.sizeof) T; // Error: struct test.S no size yet for forward reference } tupleof property requires complete semantic analysis to get the fields of a type. So it is meaningful forward reference, IMHO. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7249] 2.058 regression: no size yet for forward reference when using this.init.tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7249 --- Comment #2 from Vladimir Panteleev thecybersha...@gmail.com 2012-01-08 15:11:53 PST --- In my case, the list of fields is passed as a template parameter: struct S(string FIELDS) { mixin(FIELDS); alias typeof(Fields.init.tupleof[0]) TypeOfFirstField; } There is a simple workaround available: struct Fields { mixin(FIELDS); } alias typeof(Fields.init.tupleof[0]) TypeOfFirstField; So, if you think this is not a bug, I'm not against this change. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7249] 2.058 regression: no size yet for forward reference when using this.init.tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7249 --- Comment #3 from Vladimir Panteleev thecybersha...@gmail.com 2012-01-08 15:15:23 PST --- (In reply to comment #2) In my case, the list of fields is passed as a template parameter: struct S(string FIELDS) { mixin(FIELDS); alias typeof(Fields.init.tupleof[0]) TypeOfFirstField; Oops, last line should be: alias typeof(this.init.tupleof[0]) TypeOfFirstField; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7249] 2.058 regression: no size yet for forward reference when using this.init.tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7249 --- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-01-08 15:25:00 PST --- (In reply to comment #2) So, if you think this is not a bug, I'm not against this change. Yes, I think this is not a bug. Additionally, old behavior had a order dependent problem. struct S { alias typeof(this.init.tupleof[0]) T; // Error: array index [0] is outside array bounds [0 .. 0] // - tupleof result was empty int x; alias typeof(this.init.tupleof[0]) T; // OK, T == int } Now they raise forward reference error as a same. I think it's better consistency. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7249] 2.058 regression: no size yet for forward reference when using this.init.tupleof
http://d.puremagic.com/issues/show_bug.cgi?id=7249 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #5 from Vladimir Panteleev thecybersha...@gmail.com 2012-01-08 15:26:02 PST --- OK, thanks for looking into this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7239] C style struct initialization doesn't work with aliases
http://d.puremagic.com/issues/show_bug.cgi?id=7239 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-08 16:27:25 PST --- https://github.com/D-Programming-Language/dmd/commit/95a933d16e732cb8f70745a0be6eca6d06b6b6be https://github.com/D-Programming-Language/dmd/commit/aec19256ad52f5c73c177012d67883a5fef344af -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7250] New: [UFCS] UFCS chaining doesn't work
http://d.puremagic.com/issues/show_bug.cgi?id=7250 Summary: [UFCS] UFCS chaining doesn't work Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha dsim...@yahoo.com 2012-01-08 18:55:59 PST --- import std.algorithm, std.array; void main() { auto arr = [1, 2, 3, 4, 5]; int toAdd = 42; auto arr2 = arr.map!(a = a + toAdd)().array(); } test.d(6): Error: no property 'array' for type 'Result' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4523] [tdpl] .remove method for Associative Arrays returns void in all cases
http://d.puremagic.com/issues/show_bug.cgi?id=4523 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #5 from Walter Bright bugzi...@digitalmars.com 2012-01-08 22:51:08 PST --- https://github.com/D-Programming-Language/dmd/commit/1f14a6e0e8ebf51c8b653e5eef7fae0ba4b2889c https://github.com/D-Programming-Language/dmd/commit/3e23b0f5834acb32eaee20d88c30ead7e03bb2f4 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7251] New: GC not working
http://d.puremagic.com/issues/show_bug.cgi?id=7251 Summary: GC not working Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: regression Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2012-01-08 23:40:33 PST --- On DMD 2.057, the code: import core.memory, std.stdio; extern(Windows) int GlobalMemoryStatusEx(ref MEMORYSTATUSEX lpBuffer); struct MEMORYSTATUSEX { uint Length, MemoryLoad; ulong TotalPhys, AvailPhys, TotalPageFile, AvailPageFile; ulong TotalVirtual, AvailVirtual, AvailExtendedVirtual; } void testA(size_t count) { size_t[] a; foreach (i; 0 .. count) a ~= i; } void main() { MEMORYSTATUSEX ms; ms.Length = ms.sizeof; foreach (i; 0 .. 32) { testA(16 20); GlobalMemoryStatusEx(ms); stderr.writefln(AvailPhys: %s MiB, ms.AvailPhys 20); } } Gives output: AvailPhys: 3711 MiB AvailPhys: 3365 MiB AvailPhys: 3061 MiB AvailPhys: 2747 MiB AvailPhys: 2458 MiB core.exception.OutOfMemoryError Obviously, the GC is non-functional... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---