[Issue 7642] opDispatch with AA crashes dmd

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7642


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-04 00:37:32 PST ---
*** This issue has been marked as a duplicate of issue 7578 ***

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


[Issue 7578] ICE on indexing result of vararg opDispatch

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7578


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 CC||zan77...@nifty.com


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-04 00:37:32 PST ---
*** Issue 7642 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 7563] Class members with default template arguments have no type

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7563


Walter Bright bugzi...@digitalmars.com 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 7643] New: Whole tuple slice isn't resolved as expected

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7643

   Summary: Whole tuple slice isn't resolved as expected
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: rejects-valid
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: k.hara...@gmail.com


--- Comment #0 from Kenji Hara k.hara...@gmail.com 2012-03-04 04:39:52 PST ---
template TypeTuple(T...){ alias T TypeTuple; }

alias TypeTuple!(long, x, string, y) Specs;

template U(T...) { }

alias U!( Specs[] ) U0;  // Error: tuple T is used as a type

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


[Issue 7644] New: [tdpl] receive( (OwnerTerminated) {} ); fails to compile

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7644

   Summary: [tdpl] receive( (OwnerTerminated) {} ); fails to
compile
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: peter.alexander...@gmail.com


--- Comment #0 from Peter Alexander peter.alexander...@gmail.com 2012-03-04 
04:51:48 PST ---
The code snippet on this page no longer compiles in 2.059

http://www.informit.com/articles/article.aspx?p=1609144seqNum=8

Minimal example:

void foo() {
import std.concurrency;
receive( (OwnerTerminated) { } );
}


std/concurrency.d(529): Error: cannot have parameter of type void
std/concurrency.d(529): Error: variable
std.concurrency.receive!(void).receive._param_0 voids have no value


The problem appears to be with lambdas with unnamed user-defined parameters:


class Foo {}
auto a = (Foo) {}; // error
auto b = (Foo f) {}; // ok


If this is intentional, it wasn't mentioned as a breaking change in the 2.059
changelog.

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


[Issue 7110] opSlice() opIndex functions works unstable as template arguments

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7110


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull, rejects-valid


--- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-03-04 05:00:31 PST ---
https://github.com/D-Programming-Language/dmd/pull/784

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


[Issue 7643] Whole tuple slice isn't resolved as expected

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7643


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2012-03-04 05:00:42 PST ---
https://github.com/D-Programming-Language/dmd/pull/784

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


[Issue 7636] const hole for implicit conversion to base class

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7636


d...@dawgfoto.de changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #2 from d...@dawgfoto.de 2012-03-04 05:19:41 PST ---
*** This issue has been marked as a duplicate of issue 3731 ***

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


[Issue 3731] Can implicitly cast an immutable reference to a derived class

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3731


d...@dawgfoto.de changed:

   What|Removed |Added

 CC||d...@dawgfoto.de


--- Comment #8 from d...@dawgfoto.de 2012-03-04 05:19:41 PST ---
*** Issue 7636 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 7038] Type mismatch with const struct

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7038


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2012-03-04 05:26:47 PST ---
https://github.com/D-Programming-Language/dmd/pull/783

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


[Issue 7251] GC not working

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7251


Rob Jacques sandf...@jhu.edu changed:

   What|Removed |Added

   Priority|P2  |P4
 CC||sandf...@jhu.edu
   Platform|x86 |All
 OS/Version|Windows |All
   Severity|regression  |minor


--- Comment #7 from Rob Jacques sandf...@jhu.edu 2012-03-04 09:53:01 PST ---
(In reply to comment #6)
 (In reply to comment #5)
  No, it's inevitable that a mark-and-sweep GC on a 32 bit system won't work 
  if
  large numbers of false pointers are present. And this code:
  
 foreach (i; 0 .. count)
  a ~= i;
  
  is flooding the system with false pointers.
 
 I think you might have misunderstood the problem, like I originally did.
 
 I am **  NOT  *** filling the system with false pointers.
 See David Simcha's comment in response to mine:
 http://stackoverflow.com/a/8796226/541686
 
 It's inherently defective -- I'm merely _allocating_ a lot of memory, that's
 all. The rest is a problem with the GC's algorithm.
 (Unless you expect that no one will allocate one 20-MB chunk of RAM?)

The static data segment and the stack generate _always_ contain false pointers.
So even if you're not generating them yourself much, they do exist and things
will get stuck. 

Also, direct use of ~= is discouraged; appender is recommended instead and
there  patch for appender that solves this issue.

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


[Issue 7644] [tdpl] receive( (OwnerTerminated) {} ); fails to compile

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7644


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #1 from Walter Bright bugzi...@digitalmars.com 2012-03-04 
10:57:36 PST ---
With:

  class Foo {}
  auto a = (Foo) {}; // error

I get with 2.058 and 2.059:

  Error: cannot infer type from ambiguous function literal __lambda2

That's different from what you say you're getting. It's also correct, as the
type of parameter Foo cannot be inferred.

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


[Issue 7645] New: Internal error: e2ir.c 688

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7645

   Summary: Internal error: e2ir.c 688
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r mrmoc...@gmx.de 2012-03-04 20:12:39 CET ---
class Query(string queryText)
{
class Entity
{
void[] buf;

class fld(T,string varName)
{
T opCall()
{
return cast(T)buf;
}
}
}
Entity e;
}
void main()
{
scope query = new Query!SELECT ONLY_NEEDED_COLUMNS
FROM contacts c
WHERE c.country = 'US'
AND   c.sales  1;;

auto entity = query.e;
//foreach(entity; query)
//{
auto email_addy = entity.fld!(char,email)();
}

$ dmd test.d 
entity.(fld)
Internal error: e2ir.c 688

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


[Issue 7645] Internal error: e2ir.c 688

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7645


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||andrej.mitrov...@gmail.com


--- Comment #1 from Andrej Mitrovic andrej.mitrov...@gmail.com 2012-03-04 
11:18:57 PST ---
Slightly more reduced:

class Query(string queryText)
{
class Entity
{
void[] buf;

class fld(T, string varName)
{
T opCall()
{
return cast(T)buf;
}
}
}
Entity e;
}

void main()
{
scope query = new Query!SELECT ONLY_NEEDED_COLUMNS;
auto entity = query.e;
auto email_addy = entity.fld!(char, email)();
}

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


[Issue 7038] Type mismatch with const struct

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7038



--- Comment #3 from github-bugzi...@puremagic.com 2012-03-04 11:52:33 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a1e33827c83f14004c4fd31ff665e6312ca59385
fix Issue 7038 - Type mismatch with const struct

https://github.com/D-Programming-Language/dmd/commit/2e523c415a54c7f344d18898a50e9f896e4b1a15
Merge pull request #783 from 9rnsr/fix7038

Issue 7038 - Type mismatch with const struct

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


[Issue 7646] bug in code sample and unittest

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7646



--- Comment #1 from josvanu...@gmail.com 2012-03-04 12:08:27 PST ---
(In reply to comment #0)
 I think the code should be (n = 2):
 
 ulong fib(ulong n) { 
 alias memoize!fib mfib; 
 return n = 2 ? 1 : mfib(n - 2) + mfib(n - 1); 
 }
 
 assert(fib(10) == 55); 

No, that still won't do. This is better:

ulong fib(ulong n) { 
alias memoize!fib mfib; 
return n = 2 ? n != 0 : mfib(n - 2) + mfib(n - 1); 
}

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


[Issue 7595] Data being overwritten.

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7595


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

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-03-04 
12:59:52 PST ---
bug.d reduces to:
-
@trusted:

import core.stdc.stdio;
import std.datetime : benchmark;

struct Matrix {
int[4] _data;
}

void inverse(const ref Matrix m)  {
for (size_t i = 0; i  4; i++)
printf(m._data[%d] = %d\n, i, m._data[i]);
}

unittest {
Matrix m9;
m9._data[0] = 1;
m9._data[1] = 2;
m9._data[2] = 3;
m9._data[3] = 4;
for (size_t i = 0; i  4; i++)
printf(m9._data[%d] = %d\n, i, m9._data[i]);

benchmark!( { inverse(m9);} )(1);
}

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


[Issue 7038] Type mismatch with const struct

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7038


Walter Bright bugzi...@digitalmars.com 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 7645] Internal error: e2ir.c 688

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7645



--- Comment #2 from Trass3r mrmoc...@gmx.de 2012-03-04 22:36:23 CET ---
And more:

class Entity
{
  class fld()
  {
char t;
  }
}

void main()
{
Entity entity;
auto email_addy = entity.fld!().t;
}

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


[Issue 6445] [CTFE] Absurd memory usage (still) on building array

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6445


downs default_357-l...@yahoo.de changed:

   What|Removed |Added

 CC||default_357-l...@yahoo.de


--- Comment #6 from downs default_357-l...@yahoo.de 2012-03-04 14:17:45 PST 
---
Note that you can alleviate this under Linux by replacing your
/usr/libexec/gcc/i686-pc-linux-gnu/4.5.3/cc1d (adapt as appropriate, do gdc -v
hello.d to see which backend it uses) with a stub that preloads Boehm like so:

LD_PRELOAD=/usr/lib/libgc.so $(dirname $(realpath $0))/real_cc1d $@

Note that Boehm has to be built with malloc/calloc/free stubs enabled. Doing
this brought my GDC memory usage down by a factor of six. I can make -j5 again!

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


[Issue 7647] New: Internal error: ../ztc/machobj.c 2158

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7647

   Summary: Internal error: ../ztc/machobj.c 2158
   Product: D
   Version: D2
  Platform: x86_64
OS/Version: Mac OS X
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: christian.koest...@gmail.com


--- Comment #0 from Christian K�stlin christian.koest...@gmail.com 2012-03-04 
14:25:00 PST ---
create files test1.d:
void main(string[] args) {}
and test2.d:
void main(string[] args) {}

and run dmd test1.d test2.d
with dmd-version 2.058 - Internal error: ../ztc/machobj.c 2158

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


[Issue 7595] Data being overwritten.

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7595



--- Comment #3 from github-bugzi...@puremagic.com 2012-03-04 18:07:03 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d531901667997c260bfaa2d8776f27c1acc716cf
fix Issue 7595 - Data being overwritten.

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


[Issue 7595] Data being overwritten.

2012-03-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7595


Walter Bright bugzi...@digitalmars.com 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: ---