[Issue 1337] ICE(eh.c) No test case
http://d.puremagic.com/issues/show_bug.cgi?id=1337 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Comment #3 from Don clugd...@yahoo.com.au 2009-07-10 00:03:11 PDT --- As this has been open for 2 years without anyone providing a complete test case, I'm closing this as invalid. Reopen if you have a test case. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3160] New: ICE(cgcod.c 1511) returning string from void main, D1 only
http://d.puremagic.com/issues/show_bug.cgi?id=3160 Summary: ICE(cgcod.c 1511) returning string from void main, D1 only Product: D Version: 1.045 Platform: Other OS/Version: Windows Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au Courtesy of bearophile. void main() { return a; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1988] more unicode
http://d.puremagic.com/issues/show_bug.cgi?id=1988 --- Comment #2 from Dimitar Kolev dimitarrosenovko...@hotmail.com 2009-07-10 03:22:25 PDT --- Created an attachment (id=419) -- (http://d.puremagic.com/issues/attachment.cgi?id=419) more unicode in windows.d Added some unicode windows api functions. It compiles with the new 2.031 compiler. Did not test if all are working but I just added them as they are from Microsoft msdn. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1988] more unicode
http://d.puremagic.com/issues/show_bug.cgi?id=1988 --- Comment #4 from Sobirari Muhomori ma...@pochta.ru 2009-07-10 03:51:07 PDT --- GetProcAddress allows only ASCII strings. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1337] ICE(eh.c) No test case
http://d.puremagic.com/issues/show_bug.cgi?id=1337 --- Comment #4 from Sobirari Muhomori ma...@pochta.ru 2009-07-10 04:41:07 PDT --- This can be a test case, I didn't check it for 1.018, it works on 2.031. --- struct QueueFile{ int size,channel; } class A { QueueFile[] queueList; final synchronized void copy (QueueFile[] dst, QueueFile src[]) { dst[] = src; } final void watchdog () { auto len = queueList.length; auto list = (cast(QueueFile*) alloca(len * QueueFile.sizeof))[0..len]; // clone the list of queues to avoid stalling everything //copy (list, queueList); synchronized (this) memcpy (list.ptr, queueList.ptr, len * (QueueFile*).sizeof); //list[] = queueList; foreach (q; list) { if (q.size) writeln (q.channel); //if (q.isDirty) //{ //q.flush; //log.info (flushed ~q.channel.name~ to disk); //} } } } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3162] New: can't fully use floats computed in CTFE as template parameters
http://d.puremagic.com/issues/show_bug.cgi?id=3162 Summary: can't fully use floats computed in CTFE as template parameters Product: D Version: 2.028 Platform: Other OS/Version: Linux Status: NEW Keywords: rejects-valid Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bary...@smp.if.uj.edu.pl /** Computes square root at compile time */ real ctfe_sqrt(real x) { real root = x / 2.0; for (int ntries = 0; ntries 10; ntries++) { if (root * root - x == 0) break; root = (root + x / root) / 2.0; } return root; } /** Square root of 2 */ static const double sqrt2 = ctfe_sqrt(2.0); import std.metastrings; pragma(msg, Format!(s=, cast(int)(1000*sqrt2))); // works pragma(msg, Format!(s=, cast(int)(1000*sqrt2), , cast(int)(1000*sqrt2), )); // doesn't work //pragma(msg, Format!(s=, cast(int)(1000*sqrt2))); // also doesn't work pragma(msg, Format!(s=, cast(int)((1.0+sqrt2/2.0))); // doesn't works Looks that only first occurence of value derived from constant derived using ctfs can be used. It was working in some older releases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3162] can't fully use floats computed in CTFE as template parameters
http://d.puremagic.com/issues/show_bug.cgi?id=3162 --- Comment #1 from Witold Baryluk bary...@smp.if.uj.edu.pl 2009-07-10 07:34:37 PDT --- s=1414 /home/baryluk/ProjektyZSempa/D/onpd/onp/../onp/utils/misc.d(187): Error: expression cast(int)(1000 * sqrt2) is not a valid template value argument /home/baryluk/ProjektyZSempa/D/onpd/onp/../onp/utils/misc.d(187): Error: expression cast(int)(1000 * sqrt2) is not a valid template value argument /home/baryluk/ProjektyZSempa/D/onpd/onp/../onp/utils/misc.d(186): Error: expression cast(int)(1000 * (1 + sqrt2 / 2)) is not a valid template value argument ... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2905] [PATCH] Faster +-*/ involving a floating-pointing literal
http://d.puremagic.com/issues/show_bug.cgi?id=2905 --- Comment #6 from Don clugd...@yahoo.com.au 2009-07-10 07:37:23 PDT --- Revised patch against DMD2.031, which fixes the problem, and optimises a larger number of cases. This patch significantly improves performance of floating-point operations involving reals. Index: cg87.c === --- cg87.c(revision 192) +++ cg87.c(working copy) @@ -914,7 +914,8 @@ case X(OPadd, TYdouble, TYdouble): case X(OPadd, TYdouble_alias, TYdouble_alias): case X(OPadd, TYldouble, TYldouble): -//case X(OPadd, TYldouble, TYdouble): +case X(OPadd, TYldouble, TYdouble): +case X(OPadd, TYdouble, TYldouble): case X(OPadd, TYifloat, TYifloat): case X(OPadd, TYidouble, TYidouble): case X(OPadd, TYildouble, TYildouble): @@ -925,8 +926,8 @@ case X(OPmin, TYdouble, TYdouble): case X(OPmin, TYdouble_alias, TYdouble_alias): case X(OPmin, TYldouble, TYldouble): -//case X(OPmin, TYldouble, TYdouble): -//case X(OPmin, TYdouble, TYldouble): +case X(OPmin, TYldouble, TYdouble): +case X(OPmin, TYdouble, TYldouble): case X(OPmin, TYifloat, TYifloat): case X(OPmin, TYidouble, TYidouble): case X(OPmin, TYildouble, TYildouble): @@ -937,7 +938,8 @@ case X(OPmul, TYdouble, TYdouble): case X(OPmul, TYdouble_alias, TYdouble_alias): case X(OPmul, TYldouble, TYldouble): -//case X(OPmul, TYldouble, TYdouble): +case X(OPmul, TYldouble, TYdouble): +case X(OPmul, TYdouble, TYldouble): case X(OPmul, TYifloat, TYifloat): case X(OPmul, TYidouble, TYidouble): case X(OPmul, TYildouble, TYildouble): @@ -954,8 +956,8 @@ case X(OPdiv, TYdouble, TYdouble): case X(OPdiv, TYdouble_alias, TYdouble_alias): case X(OPdiv, TYldouble, TYldouble): -//case X(OPdiv, TYldouble, TYdouble): -//case X(OPdiv, TYdouble, TYldouble): +case X(OPdiv, TYldouble, TYdouble): +case X(OPdiv, TYdouble, TYldouble): case X(OPdiv, TYifloat, TYifloat): case X(OPdiv, TYidouble, TYidouble): case X(OPdiv, TYildouble, TYildouble): @@ -1364,7 +1366,12 @@ #undef X e2oper = e2-Eoper; -if (e1-Eoper == OPconst || +// Move double-sized operand into the second position if there's a chance it will allow +// combining a load with an operation (DMD Bugzilla 2905) +if ( ((tybasic(e1-Ety)==TYdouble) + ((e1-Eoper==OPvar) || (e1-Eoper==OPconst)) + (tybasic(e2-Ety) != TYdouble)) +|| (e1-Eoper == OPconst ) || (e1-Eoper == OPvar ((e1-Ety (mTYconst | mTYimmutable) !OTleaf(e2oper)) || (e2oper == OPd_f Index: el.c === --- el.c(revision 192) +++ el.c(working copy) @@ -2052,7 +2052,6 @@ * operations, since then it could change the type (eg, in the function call * printf(%La, 2.0L); the 2.0 must stay as a long double). */ -#if 0 void shrinkLongDoubleConstantIfPossible(elem *e) { if (e-Eoper == OPconst e-Ety == TYldouble) @@ -2072,7 +2071,6 @@ } } } -#endif /* @@ -2115,7 +2113,7 @@ */ break; } -#if 0 + case OPdiv: case OPadd: case OPmin: @@ -2125,7 +2123,6 @@ if (tyreal(e-Ety)) shrinkLongDoubleConstantIfPossible(e-E2); // fall through... -#endif default: if (OTbinary(op)) { -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1958] Casting to invariant breaks CTFE
http://d.puremagic.com/issues/show_bug.cgi?id=1958 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED CC||clugd...@yahoo.com.au Resolution||FIXED --- Comment #1 from Don clugd...@yahoo.com.au 2009-07-10 07:54:00 PDT --- Fixed sometime before 2.031. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 2823] -w switch breaks CTFE
http://d.puremagic.com/issues/show_bug.cgi?id=2823 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED CC||clugd...@yahoo.com.au Resolution||FIXED --- Comment #1 from Don clugd...@yahoo.com.au 2009-07-10 08:00:53 PDT --- In DMD2.031, CTFE and -w no longer makes any difference to the behaviour: it now _always_ generates an error. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3162] can't fully use floats computed in CTFE as template parameters
http://d.puremagic.com/issues/show_bug.cgi?id=3162 --- Comment #3 from Witold Baryluk bary...@smp.if.uj.edu.pl 2009-07-10 08:07:07 PDT --- Simpler example /** Square root of 2 */ static const double sqrt2 = ctfe_sqrt(2.0); template X(E ...) { alias E X; } //alias X!(sqrt2/1.0, sqrt2/2.0) X2; // doesn't work //alias X!(sqrt2*sqrt2) X3; // doesn't work static const double sqrt22 = sqrt2*sqrt2; //alias X!(sqrt22) X4; // doesn't work -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3162] can't fully use floats computed in CTFE as template parameters
http://d.puremagic.com/issues/show_bug.cgi?id=3162 --- Comment #4 from Witold Baryluk bary...@smp.if.uj.edu.pl 2009-07-10 08:15:21 PDT --- Additionally if i omit double in static const double, it compiles! It is the same type! I was also testing this ctfe function T i(T)(T x) { return x; } and only with T=float,double,real i got errors. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1709] ICE(cgcod.c 1522), using -O, no test case
http://d.puremagic.com/issues/show_bug.cgi?id=1709 Brad Roberts bra...@puremagic.com changed: What|Removed |Added CC||bra...@puremagic.com Resolution|LATER |INVALID --- Comment #5 from Brad Roberts bra...@puremagic.com 2009-07-10 10:29:33 PDT --- Changed back to invalid. For it to become valid, it needs a reasonably small reproduction case. If you want to help, actually help -- don't just go changing status because you don't like it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 1337] ICE(eh.c) No test case
http://d.puremagic.com/issues/show_bug.cgi?id=1337 Brad Roberts bra...@puremagic.com changed: What|Removed |Added Status|RESOLVED|REOPENED CC||bra...@puremagic.com Resolution|INVALID | --- Comment #5 from Brad Roberts bra...@puremagic.com 2009-07-10 10:35:03 PDT --- Reopening so the new code can be looked at. However... Term clarification 'it works on 2.031'? Does that mean that it compiles successfully or unsuccessfully? If unsuccessfully, with the same error? If it's not the same error, please include the current error message. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3163] New: Never referenced local variable compiles without error.
http://d.puremagic.com/issues/show_bug.cgi?id=3163 Summary: Never referenced local variable compiles without error. Product: D Version: 2.029 Platform: Other OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: peng2che...@yahoo.com Per Paragraph 2, Local Variables in Functions DMD 2.0, it is an error to declare a local variable that is never referred to. But this compiles and runs fine: --- code import std.stdio; void main(){ int i = 10; //never referred to -- should be error ? int k; writefln(%d, i + 3); } --- terminal ex$ /opt/dmd2/linux/bin/dmd2 Digital Mars D Compiler v2.029 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/2.0/index.html ex$ /opt/dmd2/linux/bin/dmd2 func.d ex$ ./func 13 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---