[Issue 2954] Appalling bug in associative arrays (D2 only)

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2954


Don  changed:

   What|Removed |Added

   Keywords||wrong-code
Version|unspecified |2.020
 Blocks||1934
Summary|Appalling bug in|Appalling bug in
   |associative arrays  |associative arrays (D2
   ||only)
 OS/Version|Linux   |All


--- Comment #1 from Don  2009-09-13 23:51:08 PDT ---
This test case, from bug 1934, is part of the same issue: index expressions for 
AAs don't have proper type checking. In the case below, it's not converting the 
string literal into a char[3], and consequently, bad code generation results. 
Both asserts fail.

void main()
{
char[char[3]] ac;
char[3] c = "abc";
ac["abc"]='a';
assert(ac[c]=='a');

char[dchar[3]] ad;
dchar[3] d = "abc"d;
ad["abc"d]='a';
assert(ad[d]=='a');
}

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


[Issue 3316] New: Functions nested in a pure templated function cannot reference its local variables

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3316

   Summary: Functions nested in a pure templated function cannot
reference its local variables
   Product: D
   Version: 2.032
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: peng2che...@yahoo.com


--- Comment #0 from pc  2009-09-13 16:17:31 PDT ---
import std.stdio;

/*
  ATTEMPT TO USE NESTED "PURE" FUNCTIONS IN A TEMPLATE.

  All works fine unless you uncomment the third line in main. If you
  do, dmd 2.032 yeilds:

  pure.d(35): Error: pure nested function 'bar' cannot access mutable
  data 'fooState'

  pure.d(36): Error: pure nested function 'bar' cannot access mutable
  data 'y'

  pure.d(47): Error: template instance pure.fooPT!(char) error
  instantiating
*/


//"pure" inner function, with concrete types - ok
pure string foo(string x, string y){

  string fooState;

  string bar(string x){
fooState = "hello ";
return x ~ y;
  }

  return fooState ~ bar(x);
}

//potentially pure (?) templated version not labled as pure - ok
immutable(T)[] fooT(T)(immutable(T)[] x, immutable(T)[] y){

  immutable(T)[] fooState;

  immutable(T)[] bar(immutable(T)[] x){
fooState = "hello ";
return x ~ y;
  }

  return fooState ~ bar(x);

}

//attempt to make templated version pure - no dice
pure immutable(T)[] fooPT(T)(immutable(T)[] x, immutable(T)[] y){

  immutable(T)[] fooState;

  immutable(T)[] bar(immutable(T)[] x){
fooState = "hello ";
return x ~ y;
  }

  return fooState ~ bar(x);

}


void main(){
  writeln(foo("p", "c"));
  writeln(fooT("p", "c"));
  //writeln(fooPT("p", "c"));

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


[Issue 1934] ICE(e2ir.c) using static array as AA key

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1934


Don  changed:

   What|Removed |Added

Version|2.012   |1.020
Summary|ICE(cod1.c) using static|ICE(e2ir.c) using static
   |array as AA key |array as AA key


--- Comment #2 from Don  2009-09-13 11:37:06 PDT ---
The original version for this bug report was 2.012, and in both D1 and D2, it
used to ICE in cod1.c. (Test cases also ICEs in 1.020). It was fixed in
DMD2.026, but not listed in the changelog and not fixed in D1. In recent
versions of D1, it ICEs in e2ir.c.
I've changed compiler version and title accordingly.

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


[Issue 1959] ICE(eh.c 41) alloca and Linux exception handling

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1959


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #7 from Don  2009-09-13 03:37:17 PDT ---
I'm closing this because the original bug has been fixed, and all known test
cases pass. Create a new bug if a new test case is discovered. It'll be a
different bug, even if it ICEs at the same location.

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


[Issue 3283] glue.c assertion with no info

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3283


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE


--- Comment #4 from Don  2009-09-13 03:39:51 PDT ---
Closing this as a duplicate of bug 2962, since it has no test case and
otherwise appears to be the same. Reopen if you are able to establish that it
is different. (BTW, the patch in 2962 will help in tracking down the bug).

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

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


[Issue 2962] ICE(glue.c) or bad codegen passing variable as template value parameter

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2962


Don  changed:

   What|Removed |Added

 CC||alvcas...@yahoo.es


--- Comment #19 from Don  2009-09-13 03:39:51 PDT ---
*** Issue 3283 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 3315] ICE(mtype.c) floating point converted to an integer type and passed to a function, when certain incompatible overloads exist

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3315


Don  changed:

   What|Removed |Added

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


--- Comment #1 from Don  2009-09-13 03:33:55 PDT ---
This is probably the same as the nasty regression bug 3173. I'd submitted the
patch to Walter just before 2.032 was released, but unfortunately it missed the
deadline. We considered delaying the release of 2.032 by another few days
because of it.

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


[Issue 3314] rdmd uses chdir which does not work with bash

2009-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3314


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: ---