[Issue 5451] Three ideas for RedBlackTree

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5451



--- Comment #3 from Jonathan M Davis  2011-02-16 23:54:25 
PST ---
The default constructor problem should be easily solvable once RedBlackTree
becomes a class, as it appears that it soon will, since Andrei has decided to
make the containers in std.container classes instead of structs.

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


[Issue 5595] Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595


Don  changed:

   What|Removed |Added

   Keywords||patch


--- Comment #6 from Don  2011-02-16 23:40:07 PST ---
I think my initial patch was basically correct. Overload sets are not equal to
other Objects.


int Dsymbol::equals(Object *o)
{   Dsymbol *s;

if (this == o)
return TRUE;
s = (Dsymbol *)(o);
-if (s && ident->equals(s->ident))
+// Overload sets don't have an ident
+if (s && ident && s->ident && ident->equals(s->ident))
return TRUE;
return FALSE;
}

The interesting thing, which I hadn't realized before, is that a template alias
parameter can be an overload set.
The question this raises is, are there other places in the code where it's
assumed that every DSymbol has an ident?

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


[Issue 5602] BigInts ignore leading spaces as in "%5d"

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5602


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don  2011-02-16 22:38:29 PST ---
Yes, that's a limitation of std.format. It only provides the character ('x',
'd', 's', etc). The same thing applies to std.complex.

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


[Issue 5596] SortedRange regression

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5596



--- Comment #3 from David Simcha  2011-02-16 19:48:48 PST ---
Also note that changing the comparison function in the assumeSorted line makes
this bug go away, too.

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


[Issue 5599] Rdmd: Switches after the filename have no effect

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5599



--- Comment #2 from Andrej Mitrovic  2011-02-16 
19:35:25 PST ---
My bad!

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


[Issue 5599] Rdmd: Switches after the filename have no effect

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5599


Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||and...@metalanguage.com
 Resolution||INVALID


--- Comment #1 from Andrei Alexandrescu  2011-02-16 
19:32:34 PST ---
This is as expected. Everything after the actual module name is passed to the
module itself.

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


[Issue 5596] SortedRange regression

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5596



--- Comment #2 from David Simcha  2011-02-16 19:33:35 PST ---
Here's a better-reduced test case.  Also see the comments in the test case for
some insight into what's going on here.

import std.range;

// This alias is necessary but not sufficient to reproduce the bug.  Even
// changing the white space in the comparison function, i.e. "a < b" -> "ahttp://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5600] rdmd: Broken behavior with command-line input

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5600


Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||and...@metalanguage.com
 AssignedTo|nob...@puremagic.com|and...@metalanguage.com


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


[Issue 5598] rdmd does not fail on invalid filename

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5598


Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||and...@metalanguage.com
 AssignedTo|nob...@puremagic.com|and...@metalanguage.com


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


[Issue 5603] New: Initialization syntax for dynamic arrays

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5603

   Summary: Initialization syntax for dynamic arrays
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-16 16:23:03 PST ---
Fixed-sized arrays allow to specify an initialization value, or to not specify
one, or to leave the stack memory untouched, for special situations where
performance matters a lot:

// program #1
void main() {
int[5] a2 = void;

int[5] a1 = 1;

int[5][5] m2 = void;

int[5][5] m1 = 1;
}


Dynamic arrays don't allow to specify an initialization value (expecially after
the deprecation of 'typedef', that used to allow the definition of a new int
type with a different init value). DMD has no syntax to allocate an unitialized
array, and currently it is not able to avoid double initializations of dynamic
arrays, an example:


// program #2
void main() {
auto a1 = new int[5];
a1[] = 1;
}


Asm of program #2 (optimized built). __d_newarrayT performs a first
initialization to zero, __memset32 performs a second initialization:

__Dmain comdat
L0: sub ESP,01Ch
mov EAX,offset FLAT:_D11TypeInfo_Ai6__initZ
push 5
push EAX
call near ptr __d_newarrayT
mov 0Ch[ESP],EAX
mov 010h[ESP],EDX
push dword ptr 0Ch[ESP]
push 1
push EDX
call near ptr __memset32
add ESP,014h
add ESP,01Ch
xor EAX,EAX
ret


So to translate the program #1 for dynamic arrays you need something like this
(I am not sure this is fully correct. GC.disable are used because m1/m2 contain
uninitialized pointers):


// program #3
import core.memory: GC;

void main() {
uint ba1 = GC.BlkAttr.NO_SCAN | GC.BlkAttr.APPENDABLE;
int n1 = 5;
int[] a1 = (cast(int*)GC.malloc(int.sizeof * n1, ba1))[0 .. n1];

uint ba2 = GC.BlkAttr.NO_SCAN | GC.BlkAttr.APPENDABLE;
int n2 = 5;
int[] a2 = (cast(int*)GC.malloc(int.sizeof * n2, ba2))[0 .. n2];
a2[] = 1;

uint ba3a = GC.BlkAttr.APPENDABLE;
uint ba3b = GC.BlkAttr.NO_SCAN | GC.BlkAttr.APPENDABLE;
int n3 = 5;
GC.disable();
int[][] m1 = (cast(int[]*)GC.malloc((int[]).sizeof * n3, ba3a))[0 .. n3];
foreach (ref row; m1)
row = (cast(int*)GC.malloc(int.sizeof * n3, ba3b))[0 .. n3];
GC.enable();

uint ba4a = GC.BlkAttr.APPENDABLE;
uint ba4b = GC.BlkAttr.NO_SCAN | GC.BlkAttr.APPENDABLE;
int n4 = 5;
GC.disable();
int[][] m2 = (cast(int[]*)GC.malloc((int[]).sizeof * n4, ba4a))[0 .. n4];
foreach (ref row; m2) {
row = (cast(int*)GC.malloc(int.sizeof * n4, ba4b))[0 .. n4];
row[] = 1;
}
GC.enable();
}


So to avoid all that bug-prone mess I suggest to allow the fixed-sized array
syntax for dynamic arrays too:

// program #4
void main() {
auto a2 = new int[5] = void;

auto a1 = new int[5] = 1;

auto m2 = new int[][](5, 5) = void;

auto m1 = new int[][](5, 5) = 1;
}



An usage of unitialized memory:
http://research.swtch.com/2008/03/using-uninitialized-memory-for-fun-and.html

"An Efficient Representation for Sparse Sets" (1993), by Preston Briggs, Linda
Torczon:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.7319

>From programming pearls book:
http://books.google.it/books?id=kse_7qbWbjsC&pg=PA207&lpg=PA207&dq=programming+pearls+uninitialized&source=bl&ots=DfAXDLwT5z&sig=X53xYgD0wdn_Rwl7tFNeCiRt4No&hl=en&ei=HWVcTa35EYOdOsLI5OYL&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBUQ6AEwAA

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


[Issue 5602] New: BigInts ignore leading spaces as in "%5d"

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5602

   Summary: BigInts ignore leading spaces as in "%5d"
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: wrong-code
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-16 16:21:58 PST ---
import std.stdio, std.bigint;
void main() {
writefln("%10d", BigInt(10));
writefln("%10d", 10);
}


It prints:
10
10

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


[Issue 5601] New: A template forward reference error

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5601

   Summary: A template forward reference error
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-02-16 16:20:11 PST ---
A case of forward template forward reference (I am not sure this is actually a
bug):


import std.traits;
auto foo() {
alias ReturnType!foo T;
return 0;
}
void main() {}


DMD 2.052 shows (it's not a regression):

...\dmd\src\phobos\std\traits.d(122): Error: template instance forward
reference of foo
...\dmd\src\phobos\std\traits.d(105): Error: forward reference to foo
...\dmd\src\phobos\std\traits.d(122): Error: template instance
std.traits.staticLength!(foo) error instantiating

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


[Issue 3959] can't mixin result of templated static struct method

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3959



--- Comment #1 from Vladimir  2011-02-16 15:40:23 PST 
---
*** Issue 5526 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 5526] Static templated functions don't work with CTFE

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5526


Vladimir  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #1 from Vladimir  2011-02-16 15:40:22 PST 
---
Oops, I stumbled upon the exact same bug a while ago.

*** This issue has been marked as a duplicate of issue 3959 ***

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


[Issue 5597] [64-bit] Illegal Instruction on Ancient Hardware

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5597



--- Comment #5 from David Simcha  2011-02-16 14:38:42 PST ---
Looks like it does fail on sahf.  I had a somewhat painful time, though,
figuring this out.  GDB just puts (bad) in the disassembly at that point
(probably because the GDB on that machine is ancient).  Therefore, I had to
take the offset that the error was at and look for it in obj2asm.

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


[Issue 5595] Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595



--- Comment #5 from Don  2011-02-16 14:23:24 PST ---
Another reduction, uses test1.d and test2.d from the previous comment. It's
clear that IFTI is not required. The issue is instantiating a tuple with an
overload set. If you change the baz(F...) to baz(F) you get:
test0.d(7): Error: template instance baz!(__anonymous) does not match template
declaration baz(F)
which shows that the overload set really doesn't have an identifier.
Also, you can replace the (F...) with (alias F), and still get the segfault. So
it is not a problem with tuples; it's a problem with overload sets of
templates.

=

import test1, test2;

void foo(A)() {}

template baz(F...)
{
enum int baz = 1;
}

static assert(baz!bar == baz!foo);

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


[Issue 5600] New: rdmd: Broken behavior with command-line input

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5600

   Summary: rdmd: Broken behavior with command-line input
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-02-16 
13:40:34 PST ---
This is as odd as it gets. In Windows command-line:

> type math.d
module math;
import std.stdio;
import core.stdc.stdio;
import std.conv;
import std.string;

string prompt = "Enter a number: ";
int input;

void main()
{
write(prompt);
auto result = to!int(readln().strip);

writeln(result);
}

I run the test module via rdmd, and enter 45:
> rdmd math.d
D:\dev\code\d_code\bugs>Enter a number: 45
'45' is not recognized as an internal or external command,
operable program or batch file.

Now I thought I'm back to command line, but it appears I'm somehow still "in"
rdmd mode:
D:\dev\code\d_code\bugs>test
std.conv.ConvException: std.conv(727): Can't convert value `test' of type
const(char)[] to type int
std.conv.ConvException: std.conv(1129): Can't convert value `test' of type
const(char)[] to type int

Finally I'm back to command line
>test
'test' is not recognized as an internal or external command,
operable program or batch file.
D:\dev\code\d_code\bugs>

Using DMD, this test module works fine:
> dmd math.d
> math.exe
Enter a number: 34
34

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


[Issue 5597] [64-bit] Illegal Instruction on Ancient Hardware

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5597



--- Comment #4 from Walter Bright  2011-02-16 
13:25:06 PST ---
Neither dmd nor the runtime uses LAHF, but they do use SAHF which I think is
the same issue.

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


[Issue 5598] New: rdmd does not fail on invalid filename

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5598

   Summary: rdmd does not fail on invalid filename
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: accepts-invalid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-02-16 
13:21:13 PST ---
> rdmd thisFileDoesNotExist

Produces thisFileDoesNotExist.d.deps, and no error messages.

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


[Issue 5599] New: Rdmd: Switches after the filename have no effect

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5599

   Summary: Rdmd: Switches after the filename have no effect
   Product: D
   Version: unspecified
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic  2011-02-16 
13:22:31 PST ---
module test;

void main() { }
unittest {
assert(0);
}

rdmd test.d -unittest
>

Expected behavior is:
rdmd -unittest test.d
core.exception.AssertError@test(5): unittest failure

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


[Issue 5595] Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595



--- Comment #4 from Don  2011-02-16 13:12:13 PST ---
Reduced test case shows it involves overload sets of templates. Segfaults as
far back as 2.012. Definitely not a regression.

 test1.d ===
void bar(D)(D x) {}

 test2.d ===
void bar(N)(N x) {}

 test0.d ===
import test1, test2;

template map(fun...)
{
void map(R)(R r) {}
}

void foo(A)(A x) {}

void baz() {
int xxx;
char yyy;
map!(bar)(yyy);
map!(foo)(xxx);
}

---
dmd test0


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


[Issue 5597] [64-bit] Illegal Instruction on Ancient Hardware

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5597


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #3 from Walter Bright  2011-02-16 
13:09:53 PST ---
When running it under gdb, can you verify that it actually does fail on the
LAHF instruction?

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


[Issue 5591] EBX register not preserved when calling stdcall function pointer

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5591


Don  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||clugd...@yahoo.com.au


--- Comment #3 from Don  2011-02-16 12:22:07 PST ---
Top priority for this one.

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


[Issue 5591] EBX register not preserved when calling stdcall function pointer

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5591


hypothermia.fr...@gmail.com changed:

   What|Removed |Added

   Severity|major   |critical


--- Comment #2 from hypothermia.fr...@gmail.com 2011-02-16 12:10:39 PST ---
After disassembly I found out that this code was generated(no -O switch):
//asm { mov EBX,3; } bar(4);
mov ebx, 3
push4
mov ebx, large fs:2Ch
mov esi, [ebx]
calldword ptr [esi+4F4h]
mov [ebp+var_20], ebx

//the next round ecx is used...
//asm { mov EBX,5; } bar(6);
mov ebx, 5
push6
mov ecx, large fs:2Ch
mov edx, [ecx]
calldword ptr [edx+4F4h]
mov [ebp+var_20], ebx

Why is DMD not preserving the EBX register in the first call? The worst thing
is that the compiler doesn't even know tha there's something in EBX... This
problem happened to me with when EBX had a this pointer and then DMD didn't
save it and after the function pointer call I got an exception!

I think this is a serious issue and should be looked at ASAP.

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


[Issue 5595] Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595



--- Comment #3 from Don  2011-02-16 11:51:32 PST ---
Slightly reduced test case:
-
import std.algorithm;
import std.datetime;
import std.math;

void foo(A)(A x) {}

void readExp() {
int xxx;
double[] yyy;
map!(abs)(yyy);
map!(foo)(xxx);
}

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


[Issue 5597] [64-bit] Illegal Instruction on Ancient Hardware

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5597



--- Comment #2 from David Simcha  2011-02-16 11:00:45 PST ---
Argh there really needs to be a way to edit these posts.  I accidentally got
the wrong box.  The correct info for the oldest CPU it does work on is:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 15
model name  : Intel(R) Xeon(R) CPU   E7330  @ 2.40GHz
stepping: 11
cpu MHz : 2393.892
cache size  : 3072 KB
physical id : 0
siblings: 4
core id : 0
cpu cores   : 4
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor
ds_cpl est tm2 cx16 xtpr lahf_lm
bogomips: 4791.31
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

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


[Issue 5597] [64-bit] Illegal Instruction on Ancient Hardware

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5597



--- Comment #1 from David Simcha  2011-02-16 10:59:07 PST ---
BTW, I think this is related to the lahf instruction because it's apparently
been a big problem in the past with old 64-bit CPUs not supporting it.  Here's
the cpuinfo for the oldest hardware this code does work on.  The only
difference in flags looks to be lahf.

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 15
model name  : Intel(R) Xeon(R) CPU   E7330  @ 2.40GHz
stepping: 11
cpu MHz : 2394.055
cache size  : 3072 KB
physical id : 0
siblings: 4
core id : 0
cpu cores   : 4
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm
constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor
ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca lahf_lm tpr_shadow vnmi
flexpriority
bogomips: 4788.11
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

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


[Issue 5594] MODEL doesn't work the same way for DMD, Phobos and Druntime

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5594


Brad Roberts  changed:

   What|Removed |Added

 CC||bra...@puremagic.com


--- Comment #1 from Brad Roberts  2011-02-16 10:10:48 PST 
---
Worth noting, you don't need to build dmd as a 64 bit binary to have it
generate 64 bit output.  I do agree that consistency would be good.

While fixing inconsistencies, there's a similar one for building phobos between
the posix and win32 make files.  posix.mak uses DRUNTIME_PATH and win32.mak
uses DRUNTIME.

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


[Issue 5595] Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595



--- Comment #2 from Don  2011-02-16 08:28:43 PST ---
The regression was caused by a Phobos change, which has triggered a compiler
segfault in interpret.c.
In attempting to instantiate map!(to), 'to' is a symbol with no identifier.
(.ident is NULL).
The segfault can be prevented in dsymbol.c, line 70, by checking for a null
identifier. But without knowing why we're getting a null identifier, I can't
recommend this as a valid patch.

int Dsymbol::equals(Object *o)
{   Dsymbol *s;

if (this == o)
return TRUE;
s = (Dsymbol *)(o);
-if (s && ident->equals(s->ident))
+if (s && s->ident && ident->equals(s->ident))
return TRUE;
return FALSE;
}

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


[Issue 5401] std.socket updates and boost license

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5401


Masahiro Nakagawa  changed:

   What|Removed |Added

 CC||repeate...@gmail.com


--- Comment #5 from Masahiro Nakagawa  2011-02-16 
08:27:57 PST ---
http://lists.puremagic.com/pipermail/phobos/2010-July/001171.html

I suggested std.socket replacement in Phobos ML. This improvement that creates
Asio based new socket is still continuing with a view to event, but I don't
have enough time ;(

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


[Issue 5597] New: [64-bit] Illegal Instruction on Ancient Hardware

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5597

   Summary: [64-bit] Illegal Instruction on Ancient Hardware
   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: dsim...@yahoo.com


--- Comment #0 from David Simcha  2011-02-16 08:17:59 PST ---
The following code works on newer hardware, but terminates with "Illegal
instruction" on some ancient CPUs (details below):

import std.conv;

void main() {
string foo = "1.0";
parse!float(foo);
}

The ancient hardware in question (first CPU from cat /proc/cpuinfo):

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 15
model   : 4
model name  :Intel(R) Xeon(TM) MP CPU 3.66GHz
stepping: 1
cpu MHz : 3657.816
cache size  : 1024 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 1
fpu : yes
fpu_exception   : yes
cpuid level : 5
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor
ds_cpl est tm2 cid cx16 xtpr
bogomips: 7321.85
clflush size: 64
cache_alignment : 128
address sizes   : 40 bits physical, 48 bits virtual
power management:

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


[Issue 5595] Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don  2011-02-16 07:58:26 PST ---
Confirmed. I'm on it.

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


[Issue 5596] SortedRange regression

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5596



--- Comment #1 from David Simcha  2011-02-16 07:46:57 PST ---
Forgot to paste in the error message.  Here it is:

d:\dmd2\windows\bin\..\..\src\phobos\std\range.d(5415): Error: this for _input
needs to be type SortedRange not type SortedRange!(string[],"a < b")

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


[Issue 5596] New: SortedRange regression

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5596

   Summary: SortedRange regression
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha  2011-02-16 07:46:16 PST ---
The following code works on 2.051 but not 2.052 beta:

import std.range, std.algorithm, std.functional;

alias SortedRange!(string[], "a < b") Set;

Set readTfList(string setFile) {
string[] raw;
return pipe!(sort, uniq, array, assumeSorted)(raw);
}

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


[Issue 5595] New: Compiler crash on heavy std.algorithm use

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5595

   Summary: Compiler crash on heavy std.algorithm use
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Keywords: ice-on-valid-code
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha  2011-02-16 07:39:21 PST ---
The following code crashes the compiler on Windows using the latest beta of
2.052.  It works on 2.051.

import std.algorithm, std.math, std.stdio, std.conv;

// std.datetime isn't used but needs to be imported to reproduce the bug.
import std.datetime;

void invert(double[][] mat) {
foreach(i, row; mat) {
double absMax = map!(abs)(row).front;
}
}

void readExp() {
auto handle = File("foo.txt");
auto lines = handle.byLine();
auto ls = lines.front().splitter('\t');
if(!ls.empty) {
auto floats = map!(to!float)(ls).front;
}
}

void main(string[] args) {}

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


[Issue 5594] New: MODEL doesn't work the same way for DMD, Phobos and Druntime

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5594

   Summary: MODEL doesn't work the same way for DMD, Phobos and
Druntime
   Product: D
   Version: D2
  Platform: Other
OS/Version: Windows
Status: NEW
  Severity: minor
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha  2011-02-16 06:57:23 PST ---
To build DMD as a 64-bit binary:

make -flinux.mak MODEL=-m64

To build Phobos or Druntime as 64-bit:

make -fposix.mak MODEL=64

These are not consistent and should be.

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


[Issue 5451] Three ideas for RedBlackTree

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5451


Steven Schveighoffer  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #2 from Steven Schveighoffer  2011-02-16 
06:20:45 PST ---
*** Issue 5586 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 5586] length property for RedBlackTree

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5586


Steven Schveighoffer  changed:

   What|Removed |Added

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


--- Comment #2 from Steven Schveighoffer  2011-02-16 
06:20:45 PST ---
bearophile, you can mark things as duplicates if you find they are duplicates.

*** This issue has been marked as a duplicate of issue 5451 ***

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


[Issue 5593] Add dladdr to druntime for linux/FreeBSD

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5593


Iain Buclaw  changed:

   What|Removed |Added

 CC||ibuc...@ubuntu.com


--- Comment #2 from Iain Buclaw  2011-02-16 05:18:22 PST ---
It's not a Posix standard as far as I'm aware, but it was first defined in
SunOS, and all others followed suit.

http://www.unix.com/man-page/OpenSolaris/3c/dladdr/
http://www.unix.com/man-page/Linux/3/dladdr/
http://www.unix.com/man-page/FreeBSD/3/dladdr/
http://www.unix.com/man-page/OSX/3/dladdr/

Regards

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


[Issue 5593] Add dladdr to druntime for linux/FreeBSD

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5593


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright  2011-02-16 
03:26:28 PST ---
No good one :-)

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


[Issue 5580] [64-bit] String switch statements broken in 64-bit mode

2011-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5580


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #7 from Walter Bright  2011-02-16 
00:54:02 PST ---
https://github.com/D-Programming-Language/dmd/commit/f1c158eac6f9d1a28314c7e473c89be8b8a4f774

https://github.com/D-Programming-Language/dmd/commit/b3bb64d6ff00beddfc45c228941feedeb2e27842

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