[Issue 4738] New: ICE using null array in static/constraint if

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4738

   Summary: ICE using null array in static/constraint if
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice-on-valid-code
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: rsi...@gmail.com
Depends on: 1982


--- Comment #0 from Shin Fujishiro rsi...@gmail.com 2010-08-26 20:35:01 PDT 
---
Since dmd r629: ICE(expression.c, 816) occurs when null array is used in
static-if or template constraint.

Repro.
 test.d
static if (string.init.length  0)  // null array
{
}

% dmd -c -o- test
Assertion failed: (precedence[e-op] != PREC_zero), function expToCBuffer, file
expression.c, line 816.


It was a rejects-valid bug 1982 before r629.

% dmd-r628 -c -o- test
test.d(1): Error: expression (null.length)  0u is not constant or does not
evaluate to a bool


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4738] ICE using null array in static/constraint if

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4738



--- Comment #1 from Shin Fujishiro rsi...@gmail.com 2010-08-26 20:40:34 PDT 
---
The phobos' std.conv hits this issue.

% dmd -c -unittest std/conv.d
Assertion failed: (precedence[e-op] != PREC_zero), function expToCBuffer, file
expression.c, line 816.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3935] opBinary is instantiated with =

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3935


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 2010-08-26 
22:53:32 PDT ---
http://www.dsource.org/projects/dmd/changeset/630

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4655] Regression(1.063, 2.048) goto to a try block ICEs

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4655


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2010-08-26 
23:27:30 PDT ---
http://www.dsource.org/projects/dmd/changeset/631

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4302] Regression(2.046, 1.061): compiler errors using startsWith in CTFE

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4302


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #8 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
00:26:49 PDT ---
http://www.dsource.org/projects/dmd/changeset/632

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4739] New: Bad result retrieving 'char' keys in assoc array

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4739

   Summary: Bad result retrieving 'char' keys in assoc array
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: wrong-code
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: cbkbbej...@mailinator.com


--- Comment #0 from Nick Sabalausky cbkbbej...@mailinator.com 2010-08-27 
00:21:53 PDT ---
import std.stdio;

void main()
{
auto aa = ['a':1, 'b':2, 'c':3];

assert('a' in aa); // Ok
assert('b' in aa); // Ok
assert('c' in aa); // Ok

// Expected:
//   'a', 'b' and 'c' in any order
// Actual:
//   'a', '\0' and '\0'
foreach(char ch; aa.keys)
write(ch);
}

In my full program (ie, not this simplified test case), the first key is 'a'
(which is ok), the second is 'L' (should be 'b' or 'c'), and the third varies
depending on seemingly trivial and unrelated changes elsewhere. This would seem
to suggest a corrupted pointer somewhere, or maybe memory stomping.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3348] Documentation for many std.process functions has disappeared

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3348


Lars T. Kyllingstad bugzi...@kyllingen.net changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3232] std.math.approxEqual should consider maxAbsDiff when rhs==0 lhs!=0

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3232


Lars T. Kyllingstad bugzi...@kyllingen.net changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


--- Comment #2 from Lars T. Kyllingstad bugzi...@kyllingen.net 2010-08-27 
06:44:27 PDT ---
Fixed by Andrei a long time ago.

http://www.dsource.org/projects/phobos/changeset/1313

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4739] Bad result retrieving 'char' keys in assoc array

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4739


Steven Schveighoffer schvei...@yahoo.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||schvei...@yahoo.com
 Resolution||DUPLICATE


--- Comment #1 from Steven Schveighoffer schvei...@yahoo.com 2010-08-27 
07:23:12 PDT ---
*** This issue has been marked as a duplicate of issue 4201 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4201] associative arrays keys property contains corrupted data for keys property for keys of size size_t

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4201


Steven Schveighoffer schvei...@yahoo.com changed:

   What|Removed |Added

 CC||cbkbbej...@mailinator.com


--- Comment #3 from Steven Schveighoffer schvei...@yahoo.com 2010-08-27 
07:23:12 PDT ---
*** Issue 4739 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 4328] templated unittests fail to link when instantiated from other file if compiler order isn't correct

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4328


Rainer Schuetze r.sagita...@gmx.de changed:

   What|Removed |Added

 CC||r.sagita...@gmx.de


--- Comment #1 from Rainer Schuetze r.sagita...@gmx.de 2010-08-27 08:15:20 
PDT ---
even worse: the link fails if the template is in a library and the library is
not compiled with unittests:

import std.stdio;

void main()
{
writef(\n);
}

dmd -unittest test.d

OPTLINK (R) for Win32  Release 8.00.2
Copyright (C) Digital Mars 1989-2009  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
test.obj(test)
 Error 42: Symbol Undefined _D3std6format15__unittest_failFiZv
--- errorlevel 1

Strangely, the relased phobos.lib is compiled with unittests, while the
makefile does not pass -unittest. So this does only show up when I compile
the runtime library myself.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4328] templated unittests fail to link when instantiated from other file if compiler order isn't correct

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4328



--- Comment #2 from Rainer Schuetze r.sagita...@gmx.de 2010-08-27 08:39:32 
PDT ---
Here's a workaround: similar to the assert handling, generate the unittest_fail
function whenever there is a template in the module:

Index: template.c
===
--- template.c(revision 632)
+++ template.c(working copy)
@@ -429,6 +429,13 @@
 sc-module-toModuleAssert();
 }

+if (/*global.params.useUnitTests */ sc-module)
+{
+// Generate this function as it may be used
+// when template is instantiated in other modules
+sc-module-toModuleUnittest();
+}
+
 /* Remember Scope for later instantiations, but make
  * a copy since attributes can change.
  */

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4740] New: core.thread.atomicOp too strict about types

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4740

   Summary: core.thread.atomicOp too strict about types
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: druntime
AssignedTo: s...@invisibleduck.org
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha dsim...@yahoo.com 2010-08-27 12:10:35 PDT ---
The following code should really work:

import core.atomic;

void main() {
uint num;
atomicOp!+=(num, 1U);  // Works
atomicOp!+=(num, 1);  // Doesn't work because 1 is an int, not a uint.
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 190] Cannot forward reference typedef/alias in default value for function parameter

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=190


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #4 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
16:03:09 PDT ---
http://www.dsource.org/projects/dmd/changeset/634

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3979] Order-of-compilation and forward reference errors

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3979


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #8 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
16:06:37 PDT ---
http://www.dsource.org/projects/dmd/changeset/634

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4742] New: int % BigInt should work

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4742

   Summary: int % BigInt should work
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha dsim...@yahoo.com 2010-08-27 17:14:08 PDT ---
import std.bigint;

void main() {
BigInt i;
auto foo = 1 % i;
}

test9.d(5): Error: incompatible types for ((1) % (i)): 'int' and 'BigInt'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4652] Compiler hangs on template with zero-length tuple and another argument

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4652


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #6 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
20:54:58 PDT ---
http://www.dsource.org/projects/dmd/changeset/635

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4743] New: Internal compiler error involving in UnknownType*

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4743

   Summary: Internal compiler error involving in UnknownType*
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: 2kor...@gmail.com


--- Comment #0 from Koroskin Denis 2kor...@gmail.com 2010-08-27 21:04:06 PDT 
---
Test case is as simple as that:

module crashme.d

class Foo
{
void crash(in Bar* e) { // Bar is not defined
}
}

# dmd crashme.d

Assertion failure: 'tn-mod  MODimmutable || tn-mod  MODconst' on line 875
in file 'mtype.c'

abnormal program termination

DMD2.048, no idea if it applies to D1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4564] ICE on undefined variable in foreach over 0 .. undef

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4564


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
21:36:47 PDT ---
http://www.dsource.org/projects/dmd/changeset/636

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only.

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3493


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #3 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
22:11:46 PDT ---
http://www.dsource.org/projects/dmd/changeset/637

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2511] Covariant return type doesn't work with circular import

2010-08-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2511


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #5 from Walter Bright bugzi...@digitalmars.com 2010-08-27 
22:33:25 PDT ---
The patch breaks this code:

class UA {
A29 f() { return null; }
}

class UB : UA {
B29 f() { return null; }
}

class A29
{
}

class B29 : A29
{
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---