[Issue 11963] New: Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11963

   Summary: Regression(2.065) ICE(parse.c) Parser crash
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2014-01-22 20:07:29 EST ---
A()=

DMD v2.065 DEBUG
testx.d(1): Error: unexpected ( in declarator
testx.d(1): Error: identifier expected for template type parameter
testx.d(1): Error: no identifier for declarator A
assert parse.c(3401) !tpl

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


[Issue 11962] VisualD needs an option to choose the CRT to link against

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11962


Benjamin Thaut c...@benjamin-thaut.de changed:

   What|Removed |Added

 CC||c...@benjamin-thaut.de


--- Comment #1 from Benjamin Thaut c...@benjamin-thaut.de 2014-01-22 01:33:53 
PST ---
This might be a duplicate of bug 10316

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


[Issue 11902] DMD debuginfo doesn't seem to write classes correctly

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11902



--- Comment #8 from Manu turkey...@gmail.com 2014-01-22 01:44:34 PST ---
(In reply to comment #7)
 I do agree that we're forced to live with any bugs in VS. Even if Microsoft
 fixes them, those fixes often don't wind up on users' machines.
 
 If @ is the only thing that will work across the VS versions, I'll pull
 Rainer's patch for it. I just think it's painfully ugly.

Does it make sense to activate it on a compile flag, then VD can supply it when
it needs to?
If there are differences between the 2 debug engines, then it makes sense to
support the newer debug engine one by default, and the old one on a compile
flag, especially since VS2008-2010 are still in very common use.

I'm sure Rainer knows the most appropriate way to handle these problems.

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


[Issue 11963] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11963


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2014-01-22 01:51:05 PST ---
https://github.com/D-Programming-Language/dmd/pull/3135

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


[Issue 11902] DMD debuginfo doesn't seem to write classes correctly

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11902


Benjamin Thaut c...@benjamin-thaut.de changed:

   What|Removed |Added

 CC||c...@benjamin-thaut.de


--- Comment #9 from Benjamin Thaut c...@benjamin-thaut.de 2014-01-22 01:59:10 
PST ---
I think it would be good to actuvate the @ mangling with a compiler flag.
64-bit support is currenlty beeing built into Mago
(http://dsource.org/projects/mago_debugger). As soon as this is done and its
fully working, I would think that mago will be the primary choice to debug D on
Windows within Visual Studio, as it supports D specific debugging features
(e.g. evaluating D expressions). And as soon as mago becomes the defacto
standard for debugging the @ mangling is no longer needed. So adding a switch
as temporary solution might be the best choice.

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


[Issue 11962] VisualD needs an option to choose the CRT to link against

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11962



--- Comment #2 from Manu turkey...@gmail.com 2014-01-22 02:18:16 PST ---
(In reply to comment #1)
 This might be a duplicate of bug 10316

I'm suggesting an option to explicitly choose which one to link be made
available in the VisualD project settings. You're suggesting that the default
should change when -debug is supplied.

I think both are valid bugs. But they are definitely different issues.

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


[Issue 10316] DMD does not link against debug c runtime with -debug on x64 windows

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=10316


Manu turkey...@gmail.com changed:

   What|Removed |Added

 CC||turkey...@gmail.com


--- Comment #1 from Manu turkey...@gmail.com 2014-01-22 02:26:50 PST ---
I agree, but it also needs an option to choose one specifically too like MSC.

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


[Issue 11964] New: Poor diagnostic in static assert with boolean operators

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11964

   Summary: Poor diagnostic in static assert with boolean
operators
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: monarchdo...@gmail.com


--- Comment #0 from monarchdo...@gmail.com 2014-01-22 02:26:41 PST ---
//
void main()
{
enum a = 0;
enum b = 1;
enum c = 2;
static assert(b  a  a  b  b  c);
}
//

This creates:
//
Error: static assert  (false  1  2) is false
//

This is not helpful at all.

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


[Issue 11963] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11963



--- Comment #2 from github-bugzi...@puremagic.com 2014-01-22 02:27:09 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6fdb1072d17726146eea5c3184dd67cf490c9bc3
fix Issue 11963 - ICE(parse.c) Parser crash

https://github.com/D-Programming-Language/dmd/commit/19a756f99c610b2906cc87b0e10b63b42a49a4e2
Merge pull request #3135 from 9rnsr/fix11963

[REG2.065a] Issue 11963 - ICE(parse.c) Parser crash

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


[Issue 11962] VisualD needs an option to choose the CRT to link against

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11962



--- Comment #3 from Benjamin Thaut c...@benjamin-thaut.de 2014-01-22 02:31:46 
PST ---
But don't you agree that they have the same root cause? At least they are
related.

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


[Issue 11965] New: Regression(2.064) Segfault on garbage

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11965

   Summary: Regression(2.064) Segfault on garbage
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2014-01-22 21:44:14 EST ---
u[{b*A,

DMD v2.065 DEBUG
testx.d(1): Error: no identifier for declarator b*
testx.d(1): Error: semicolon expected, not 'EOF'
testx.d(1): Error: found 'EOF' when expecting '}' following compound statement
testx.d(1): Error: found 'EOF' when expecting ']'

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


[Issue 11965] Regression(2.064) Segfault on garbage

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11965


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Severity|normal  |regression


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


[Issue 11964] Poor diagnostic in static assert with boolean operators

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11964


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2014-01-22 02:48:29 PST ---
Related to Issue 5004 ?

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


[Issue 11962] VisualD needs an option to choose the CRT to link against

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11962



--- Comment #4 from Manu turkey...@gmail.com 2014-01-22 03:09:20 PST ---
Sure, they're both related to the CRT to linkage.

I think you're reading too much into the second sentence of my OP. The 'cause'
of this bug specifically is that VisualD doesn't present an option in the
project settings.
That's unrelated to DMD's choice of default, although sure, the reason I was
motivated to look for the option was that I wanted to change it for debug
builds, though there are many other cases where you want to choose a different
CRT too.
The full suite of CRT's should be available to choose from. Linking against
various libraries demand that you choose different libs, and there are also
times where you'd rather link to the DLL than statically.

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


[Issue 11963] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11963


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 11964] Poor diagnostic in static assert with boolean operators

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11964



--- Comment #2 from monarchdo...@gmail.com 2014-01-22 03:13:42 PST ---
I think they are both ER on a same feature, yes, but the root issue seems
completely different.

5004 is about aliases. This is about which value you actually show when the
assert is triggered.

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


[Issue 11965] Regression(2.064) Segfault on garbage

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11965



--- Comment #1 from github-bugzi...@puremagic.com 2014-01-22 03:40:57 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e136c8783c10504a6e56cbe186a852230cb05183
fix Issue 11965 - Segfault on garbage

https://github.com/D-Programming-Language/dmd/commit/e1bb12f9c399d7d2a4792ce5ec27b86767aa869c
Merge pull request #3136 from 9rnsr/fix11965

[REG2.064] Issue 11965 - Segfault on garbage

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


[Issue 11965] Regression(2.064) Segfault on garbage

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11965


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

   Keywords||pull
 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #2 from yebblies yebbl...@gmail.com 2014-01-22 22:46:54 EST ---
https://github.com/D-Programming-Language/dmd/pull/3136

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


[Issue 11966] New: Regression 2.065.b1: inout(const(char))[] doesn't convert to inout(char)[]

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11966

   Summary: Regression 2.065.b1: inout(const(char))[] doesn't
convert to inout(char)[]
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: d...@me.com


--- Comment #0 from Jacob Carlborg d...@me.com 2014-01-22 03:55:12 PST ---
The following code used to work with 2.064.2:

inout(char)[] stripped (inout(char)[] path)
{
return path;
}

struct PathParser
{
inout(const(char))[] pop () inout
{
return stripped (path);
}

inout(const(char))[] path () inout
{
return null;
}
}

void main ()
{
auto a = PathParser().pop;
}

With 2.065.b1 it results in this error:

Error: function main.stripped (inout(char)[] path) is not callable using
argument types (inout(const(char))[])

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


[Issue 11967] New: Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11967

   Summary: Regression(2.065) ICE(parse.c) Parser crash
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2014-01-22 23:26:27 EST ---
[F(%g{@

DMD v2.065 DEBUG
testx.d(1): Error: expression expected, not '%'
testx.d(1): Error: found 'g' when expecting ','
testx.d(1): Error: @identifier or @(ArgumentList) expected, not @EOF
testx.d(1): Error: valid attributes are @property, @safe, @trusted, @system,
@di
sable
testx.d(1): Error: basic type expected, not EOF
testx.d(1): Error: no identifier for declarator int
assert parse.c(4076) 0

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


[Issue 11967] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11967


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2014-01-22 04:50:07 PST ---
https://github.com/D-Programming-Language/dmd/pull/3137

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


[Issue 11967] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11967


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 11967] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11967



--- Comment #2 from github-bugzi...@puremagic.com 2014-01-22 05:25:53 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d031e962c250de4fa6c00126785809af2e771106
fix Issue 11967 - ICE(parse.c) Parser crash

https://github.com/D-Programming-Language/dmd/commit/3b23866da32b98426bbb94011c19bf928102e01f
Merge pull request #3137 from 9rnsr/fix11967

[REG2.065a] Issue 11967 - ICE(parse.c) Parser crash

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


[Issue 11966] Regression 2.065.b1: inout(const(char))[] doesn't convert to inout(char)[]

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11966


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

   What|Removed |Added

   Keywords||pull, rejects-valid


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2014-01-22 06:26:09 PST ---
https://github.com/D-Programming-Language/dmd/pull/3138

'inout const' type qualifier is introduced by fixing issue 6930, but its first
implementation had not been perfect.

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


[Issue 11968] New: ICE(expression.c) Crash when deleting __FILE__

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11968

   Summary: ICE(expression.c) Crash when deleting __FILE__
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2014-01-23 01:37:18 EST ---
void main() {  delete __FILE__  ; }

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


[Issue 11969] New: ICE(statement.c) When mixing in a string literal containing errors

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11969

   Summary: ICE(statement.c) When mixing in a string literal
containing errors
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2014-01-23 01:58:51 EST ---
void main() {  mixin ( [ i ] ) ; }

Also happens with declaration mixin:
mixin ( [ i ] ) ;

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


[Issue 11095] mixed in mixin templates not instantiated in templates?

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11095


Marco Leise marco.le...@gmx.de changed:

   What|Removed |Added

 CC||marco.le...@gmx.de


--- Comment #1 from Marco Leise marco.le...@gmx.de 2014-01-22 07:10:39 PST ---
Looks like Issue 1514 to me.

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


[Issue 11969] ICE(statement.c) When mixing in a string literal containing errors

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11969



--- Comment #1 from yebblies yebbl...@gmail.com 2014-01-23 02:20:13 EST ---
This also ICEs, possibly has the same cause

void main() {  mixin ( assert ( h ) ) ; }

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


[Issue 11968] ICE(expression.c) Crash when deleting __FILE__

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11968


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2014-01-22 07:28:16 PST ---
https://github.com/D-Programming-Language/dmd/pull/3139

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


[Issue 11969] ICE(statement.c) When mixing in a string literal containing errors

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11969


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

   What|Removed |Added

   Keywords||pull


--- Comment #2 from Kenji Hara k.hara...@gmail.com 2014-01-22 07:45:26 PST ---
https://github.com/D-Programming-Language/dmd/pull/3140

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


[Issue 11968] ICE(expression.c) Crash when deleting __FILE__

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11968



--- Comment #2 from github-bugzi...@puremagic.com 2014-01-22 07:59:17 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3fce69cf6dd630cb5acdac3562c7d7be33c39a58
fix Issue 11968 - ICE(expression.c) Crash when deleting __FILE__

https://github.com/D-Programming-Language/dmd/commit/918f3de1c99697be7057c401a245bc57a788483f
Merge pull request #3139 from 9rnsr/fix11968

Issue 11968 - ICE(expression.c) Crash when deleting __FILE__

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


[Issue 11968] ICE(expression.c) Crash when deleting __FILE__

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11968


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 899] structure field .offsetof property inaccessible in the scope

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=899


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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #3 from Kenji Hara k.hara...@gmail.com 2014-01-22 08:16:09 PST ---
(In reply to comment #2)
 Tested on DMD 2.064
 
 import std.stdio;
 struct Test {
 int field;
 }
 void main() {
 writeln(Test.field.offsetof); // works
 }
 class Class {
 void a() {
 writeln(Test.field.offsetof);  
 // Error: this for field needs to be type Test not type main.Class
 }
 }
 struct Struct {
 void a() {
 writeln(Test.field.offsetof);
 // Error: this for field needs to be type Test not type Struct
 }
 }

Finally fixed in 2.065a (git-head), by the compiler change:
https://github.com/D-Programming-Language/dmd/pull/2897

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


[Issue 11970] New: Self-assigned variable expression with no effect doesn't have compiler error

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11970

   Summary: Self-assigned variable expression with no effect
doesn't have compiler error
   Product: D
   Version: unspecified
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: ilya-stromberg-2...@yandex.ru


--- Comment #0 from ilya-stromberg ilya-stromberg-2...@yandex.ru 2014-01-22 
08:23:44 PST ---
Reduced example:

void main()
{
int i;
i = i;
}

The code `i = i;` does nothing, but there are no compiler error.

This error in real life:
https://github.com/rejectedsoftware/vibe.d/issues/406

Note that we already have errors for no effect expression, for example for this
code: `int i; i;` - `Error: var has no effect in expression (i)`.

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


[Issue 8654] cannot take address of function which is 1)overloaded, 2) templated, and 3) member (static or not): Error: xxx is not an lvalue

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=8654



--- Comment #2 from Kenji Hara k.hara...@gmail.com 2014-01-22 08:48:40 PST ---
run(a.fun3); should be ambiguous, because there's not enough context to
determine overload resolution.

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


[Issue 11969] ICE(statement.c) When mixing in a array literal containing errors

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11969



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 09:45:43 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9501233fb6240d65cc56b28f523e3343025063b8
fix Issue 11969 - ICE(statement.c) When mixing in a string literal containing
errors

More error propagation on array elements and AssertExp

https://github.com/D-Programming-Language/dmd/commit/66e2b1366a40e03276f3e3320c6e02d0b9dea480
Merge pull request #3140 from 9rnsr/fix11969

Issue 11969 - ICE(statement.c) When mixing in a string literal containing
errors

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


[Issue 11969] ICE(statement.c) When mixing in a array literal containing errors

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11969


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 11970] Self-assigned variable expression with no effect doesn't have compiler error

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11970


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2014-01-22 09:53:04 PST ---
Voted +1.

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


[Issue 11960] Phobos Mersenne Random Engine not supporting unsigned longs

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11960



--- Comment #1 from monarchdo...@gmail.com 2014-01-22 10:19:37 PST ---
https://github.com/D-Programming-Language/phobos/pull/1874

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


[Issue 11970] Self-assigned variable expression with no effect doesn't have compiler error

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11970


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com
   Severity|normal  |enhancement


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


[Issue 11971] New: [ICE] (interpret.c line 357) with undefined identifier

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11971

   Summary: [ICE] (interpret.c line 357) with undefined identifier
   Product: D
   Version: D2
  Platform: x86
OS/Version: Windows
Status: NEW
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2014-01-22 10:55:19 PST ---
Wrong code:

void main() {
import std.algorithm: filter, map;
enum foo = (int n) = [1].map!(x);
enum bar = [1].filter!(n = foo(n));
}


DMD 2.065beta crashes:

test.d(3): Error: undefined identifier x
Assertion failure: '0' on line 357 in file 'interpret.c'

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


[Issue 4181] GDB prints wrong value of TLS variables

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=4181



--- Comment #11 from Andrei Alexandrescu and...@erdani.com 2014-01-22 
13:48:07 PST ---
Awesome, keep us posted.

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


[Issue 10959] std.algorithm.remove is highly bug-prone

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=10959



--- Comment #8 from bearophile_h...@eml.cc 2014-01-22 15:33:13 PST ---
 items = items.remove(items.countUntil(needle));

monarch_dodra comments:

 Hum... that requires iterating the range twice for a non-RA 
 range. And you forgot a save:
 
 items = items.remove(items.save.countUntil(needle));

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


[Issue 5909] Allow implicit conversion of string literal (in particular x) to immutable(ubyte)[]

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=5909



--- Comment #2 from bearophile_h...@eml.cc 2014-01-22 16:42:42 PST ---
Hit this problem again. Issue 10453 shows evidence that even Phobos needs this
feature. I consider this almost a bug report instead of just an enhancement
request.

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


[Issue 10454] Hex string generates an Outside Unicode code space error

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=10454



--- Comment #1 from bearophile_h...@eml.cc 2014-01-22 16:46:01 PST ---
See also Issue 5909

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


[Issue 5909] Allow implicit conversion of hex strings to immutable(ubyte)[] and immutable(ubyte[N])

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=5909


bearophile_h...@eml.cc changed:

   What|Removed |Added

Summary|Allow implicit conversion   |Allow implicit conversion
   |of string literal (in   |of hex strings to
   |particular x) to  |immutable(ubyte)[] and
   |immutable(ubyte)[]  |immutable(ubyte[N])


--- Comment #3 from bearophile_h...@eml.cc 2014-01-22 16:45:50 PST ---
Fixed the issue title.

See also Issue 10454

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


[Issue 11963] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11963



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 16:58:04 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c66507c1c55d34e79501f7b11aff34dafd4221e9
Merge pull request #3135 from 9rnsr/fix11963

[REG2.065a] Issue 11963 - ICE(parse.c) Parser crash

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


[Issue 11967] Regression(2.065) ICE(parse.c) Parser crash

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11967



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 16:58:17 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5cf8da56ccf4cde042923e263416bf291ff47659
Merge pull request #3137 from 9rnsr/fix11967

[REG2.065a] Issue 11967 - ICE(parse.c) Parser crash

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


[Issue 11931] Linkers Symbol Undefined again with dmd HEAD when -g specified

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11931



--- Comment #5 from github-bugzi...@puremagic.com 2014-01-22 16:58:33 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/010ffc6ff9fe5a57bea1e565a5700b04aa71216b
Merge pull request #3107 from 9rnsr/fix11931

[REG2.065a] Issue 11931 - Linkers Symbol Undefined again with dmd HEAD when
-g specified

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


[Issue 11965] Regression(2.064) Segfault on garbage

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11965



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 16:58:10 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ece16e3418a1ec81b59b142ec33fcb7dc6c3bdc6
Merge pull request #3136 from 9rnsr/fix11965

[REG2.064] Issue 11965 - Segfault on garbage

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


[Issue 11941] Errors when appending to aggregate member array in CTFE

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11941



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 16:58:25 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ee4af52177e64945c107e17ae647ac22f78fd213
Merge pull request #3112 from 9rnsr/fix11941

[REG2.065a] Issue 11941 - Errors when appending to aggregate member array in
CTFE

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


[Issue 11972] New: tools makefile broken

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11972

   Summary: tools makefile broken
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: timothee.co...@gmail.com


--- Comment #0 from Timothee Cour timothee.co...@gmail.com 2014-01-22 
17:26:19 PST ---
when make -f posix.mak encounters this:

($(DMD) -v -of$(@) $(@).o 2/dev/null | grep '\-Xlinker' | cut -f2- -d' ' ;
echo -lcurl  ) | xargs $(CC)

it breaks with:
Undefined symbols for architecture x86_64:
  _main, referenced from:
 implicit entry/start for main executable

Note that this works (on my system):
$(DMD) -of$(@) $(@).o -L-lcurl

Maybe we should have a check for whether curl is installed

But as I've suggested before, we should use makefile only in initial bootstrap
step, and then use a D-based build tool which would not suck unlike makefiles.

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


[Issue 11973] New: std/datetime.d(14647): Deprecation: function std.algorithm.canFind!(not).canFind!(immutable(dchar)[]).canFind is deprecated - Please use any instead

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11973

   Summary: std/datetime.d(14647): Deprecation: function
std.algorithm.canFind!(not).canFind!(immutable(dchar)[
]).canFind is deprecated - Please use any instead
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Phobos
AssignedTo: nob...@puremagic.com
ReportedBy: timothee.co...@gmail.com


--- Comment #0 from Timothee Cour timothee.co...@gmail.com 2014-01-22 
17:52:07 PST ---


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


[Issue 11973] std/datetime.d(14647): Deprecation: function std.algorithm.canFind!(not).canFind!(immutable(dchar)[]).canFind is deprecated - Please use any instead

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11973


Timothee Cour timothee.co...@gmail.com changed:

   What|Removed |Added

 CC||timothee.co...@gmail.com
   Severity|normal  |regression


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


[Issue 11973] std/datetime.d(14647): Deprecation: function std.algorithm.canFind!(not).canFind!(immutable(dchar)[]).canFind is deprecated - Please use any instead

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11973



--- Comment #1 from Timothee Cour timothee.co...@gmail.com 2014-01-22 
18:17:48 PST ---
https://github.com/D-Programming-Language/phobos/pull/1875

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


[Issue 11922] [REG2.065a] ICE on nonexistent identifier in templated auto method

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11922



--- Comment #5 from github-bugzi...@puremagic.com 2014-01-22 18:19:12 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3a25f8a52e72c5801da0518586da1910929ac4de
Merge pull request #3094 from WalterBright/fix11922

[REG2.065a] Issue 11922 - ICE on nonexistent identifier in templated auto
method

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


[Issue 11944] ICE(expression.c) Assertion `f' failed.

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11944



--- Comment #4 from github-bugzi...@puremagic.com 2014-01-22 18:19:19 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d6a5df97319e6ea1b61bf0adf6bddc2b59a34a5b
Merge pull request #3125 from 9rnsr/fix11944

Issue 11944 - ICE(expression.c) Assertion `f' failed.

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


[Issue 11968] ICE(expression.c) Crash when deleting __FILE__

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11968



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 18:19:27 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a459c104096670a2e8052abfb279deab76d3c586
Merge pull request #3139 from 9rnsr/fix11968

Issue 11968 - ICE(expression.c) Crash when deleting __FILE__

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


[Issue 11896] [REG2.066a] isVirtualMethod related GitHub HEAD regression (works with 2.064)

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #12 from github-bugzi...@puremagic.com 2014-01-22 18:18:58 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/20c684c15c670882555e530b693dd8529e744060
Merge pull request #3104 from 9rnsr/fix11896

[REG2.065a] Issue 11896 - isVirtualMethod related GitHub HEAD regression (works
with 2.064)

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


[Issue 11930] Github regression -- Alias this not considered in is(T unused: U) matching

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11930



--- Comment #4 from github-bugzi...@puremagic.com 2014-01-22 18:18:53 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/287a7d107df20169b256b432ac9e048fde73e1fa
Merge pull request #3105 from 9rnsr/fix11930

[REG2.065a] Issue 11930 - Alias this not considered in is(T unused: U) matching

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


[Issue 11924] inout Variadic Template Parameters

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11924



--- Comment #3 from github-bugzi...@puremagic.com 2014-01-22 18:19:07 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e62b283058aa99187b910e103976e3d0a02117b6
Merge pull request #3097 from 9rnsr/fix11924

[REG2.065a] Issue 11924 - inout Variadic Template Parameters

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


[Issue 7953] DMD Error: variable r used before set when compiling with -O

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7953


kekeni...@yahoo.co.jp changed:

   What|Removed |Added

   Keywords||SIMD
 CC||kekeni...@yahoo.co.jp


--- Comment #5 from kekeni...@yahoo.co.jp 2014-01-22 18:54:54 PST ---
(In reply to comment #0)
 When compiling this code with dmd -O it says:
 test.d(55) Error: variable r used before set
 i might have overlooked something, but shouldn't that compile?

I tried to test on Windows.
I suppose this is an _expected_ behavior.
Maybe, 'r.ptr[4]' and its followings lines should be 'r.ptr[0]' and so on.

Please help, SIMD expert... :)

==
Reduced Code:
//DMDFLAGS=-O -m64
import core.simd;

alias float[8] F8;
F8 simdAdd(F8 a1, F8 a2) {
F8 res;
float4 v1;
float4 v2;
float4 r;

// 0..4 OK
v1.array = a1[0..4];
v2.array = a2[0..4];
r = __simd(XMM.ADDPS, v1,v2);
res.ptr[0] = r.ptr[0];
res.ptr[1] = r.ptr[1];
res.ptr[2] = r.ptr[2];
res.ptr[3] = r.ptr[3];

// 4..8 NG
v1.array = a1[4..8];
v2.array = a2[4..8];
r = __simd(XMM.ADDPS, v1,v2);
res.ptr[4] = r.ptr[4]; // Error: variable r used before set
res.ptr[5] = r.ptr[5];
res.ptr[6] = r.ptr[6];
res.ptr[7] = r.ptr[7];

return res;
}

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


[Issue 11974] New: ICE(cast.c) Segfault with invalid assignment

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11974

   Summary: ICE(cast.c) Segfault with invalid assignment
   Product: D
   Version: D2
  Platform: All
OS/Version: All
Status: NEW
  Keywords: ice
  Severity: normal
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: yebbl...@gmail.com


--- Comment #0 from yebblies yebbl...@gmail.com 2014-01-23 15:07:27 EST ---
void main() {  0 = __LINE__ ^^ [ 0 ] ; }

DMD v2.065 DEBUG
testx.d(1): Error: constant 0 is not an lvalue

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


[Issue 10959] std.algorithm.remove is highly bug-prone

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=10959



--- Comment #9 from daniel...@bigpond.com 2014-01-22 21:33:11 PST ---
I've just given up on this idiom, instead using:

```
import std.algorithm;
import std.stdio;

void main() {
auto items = [10, 20, 30];
auto t = items.filter!(x = x != 20).copy(items);
items = items[0 .. $ - t.length];

writeln(items);
}
```

Its the only option that has clear time and space semantics.

Ref: http://dpaste.dzfl.pl/84273326

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


[Issue 11946] need 'this' to access member when passing field to template parameter

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11946



--- Comment #6 from Kenji Hara k.hara...@gmail.com 2014-01-22 21:52:01 PST ---
I change my argue to that this regression should be marked as invalid.

(In reply to comment #5)
 (In reply to comment #0)
  
  static // http://d.puremagic.com/issues/show_bug.cgi?id=7805
  int f(A...)() { return 0; }
  
  struct S { int x; enum y = f!x(); }
  
  
 This should never have compiled. static should never have affected a template
 in global scope.

I also think so. But it had been worked because 'static' attribute is always
inherited to the instantiated function. I *fixed* the bug in the PR:

  This used to compile, but it was broken by
  https://github.com/D-Programming-Language/dmd/pull/2794

===

The main point of enhancment 11533 is that 'static template' should always
behave as same as module-level templates, regardless its declared position.

It's increasing consistency with currently known language concepts:
- 'static' attribute on module level declaration is just redundant
(meaningless).
- 'static' declaration inside aggregates/functions should behave as same as
module level declarations.
* static member function is equivalent with free functions.
* static local function is equivalent with free functions.

By the fix, `static int f(A...)(){ ... }` and `int f(A...)(){ ... }` have now
no difference at module level.
Therefore, instantiated f!(S.x) always requires hidden 'this' pointer on the
call.

To be more precise, current D language alias template parameter is not designed
just to take a symbol that is needed just only at compile-time.
If given template argument has implicit runtime context, compiler will _always_
try to take runtime context at the same time.
(To resolve the issue, nested-ness interence is sometimes proposed. But I'm
still not sure it is possible feature.)

To ignore the implicit automatic capturing, you need to write the idiom I
explained in comment#1.

As a conclusion: the reported breaking change is necessary due to add more
consistency to the language spec.

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


[Issue 11975] New: DMD64 D Compiler v2.065-devel-3b37a57 crashes for simple inheritance

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11975

   Summary: DMD64 D Compiler v2.065-devel-3b37a57 crashes for
simple inheritance
   Product: D
   Version: unspecified
  Platform: x86_64
OS/Version: Linux
Status: NEW
  Severity: blocker
  Priority: P2
 Component: DMD
AssignedTo: nob...@puremagic.com
ReportedBy: sumit.adhik...@gmail.com


--- Comment #0 from Sumit Adhikari sumit.adhik...@gmail.com 2014-01-22 
22:04:36 PST ---
Following code leads to segmentation fault:


abstract class foo_base(T) 
{
   private Tbro ; 

   public void zoo(T bro_) {
  bro = bro_ ;
   }

}

class foo(T) : foo_base!(T) 
{

}

void main() 
{

   foo!double  Foo ;
   Foo.zoo(1.0); 

}

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


[Issue 11975] DMD64 D Compiler v2.065-devel-3b37a57 crashes for simple inheritance

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11975


Sumit Adhikari sumit.adhik...@gmail.com changed:

   What|Removed |Added

 CC||sumit.adhik...@gmail.com


--- Comment #1 from Sumit Adhikari sumit.adhik...@gmail.com 2014-01-22 
22:05:54 PST ---
This is a blocker for current development. Please take a look at it as soon as
possible.

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


[Issue 11974] ICE(cast.c) Segfault with invalid assignment

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11974


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

   What|Removed |Added

   Keywords||pull


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2014-01-22 22:15:27 PST ---
https://github.com/D-Programming-Language/dmd/pull/3141

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


[Issue 11975] DMD64 D Compiler v2.065-devel-3b37a57 crashes for simple inheritance

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11975



--- Comment #2 from Kenji Hara k.hara...@gmail.com 2014-01-22 22:38:37 PST ---
(In reply to comment #0)
 Following code leads to segmentation fault:
 
 void main() 
 {
 
foo!double  Foo ;
Foo.zoo(1.0); 
 
 }

You're call instance method 'zoo' on null object reference.

void main()
{
foo!double Foo;
assert(Foo is null);  // !
Foo.zoo(1.0); // Segfault
}

To me the segfault looks intended result.

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


[Issue 11946] need 'this' to access member when passing field to template parameter

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11946



--- Comment #7 from Vladimir Panteleev thecybersha...@gmail.com 2014-01-23 
08:51:03 EET ---
 It's increasing consistency with currently known language concepts:

Yes, this is all fine and well, but it does not justify making code that worked
before now break with an indecipherable error message! The message need 'this'
to access member f is an outright lie and is only good at showing a glaring
compiler implementation problem.

(In reply to comment #1)
 template f(alias X)
 {
 static string f()
 {
 //int x = X;
 return X.stringof; // OK
 }
 }

This just shows another bug - that you still need static (which makes NO
sense for a free function, templated or not), but now you must hide it inside a
template!

 To be more precise, current D language alias template parameter is not 
 designed
 just to take a symbol that is needed just only at compile-time.
 If given template argument has implicit runtime context, compiler will 
 _always_
 try to take runtime context at the same time.

So fix this first before breaking code?

 To ignore the implicit automatic capturing, you need to write the idiom I
 explained in comment#1.

If one needs to go to a bugtracker and learn of a hacky workaround (put a
static function in a template) from a compiler developer to make their code
compile, this is a terrible situation for D.

 As a conclusion: the reported breaking change is necessary due to add more
 consistency to the language spec.

I suggest that consistency bugs are fixed only after there is an immediate and
obvious way to transition code that should not have compiled, to correct code
which functions in the same way. In either case, this bug remains a REGRESSION.

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


[Issue 11975] DMD64 D Compiler v2.065-devel-3b37a57 crashes for simple inheritance

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11975



--- Comment #3 from Sumit Adhikari sumit.adhik...@gmail.com 2014-01-22 
22:51:05 PST ---
Why is the compiler not able to tell me the problem and I need to go through a
segfault ?

Regards, Sumit

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


[Issue 11974] ICE(cast.c) Segfault with invalid assignment

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11974



--- Comment #2 from github-bugzi...@puremagic.com 2014-01-22 23:02:49 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f369af1d02242bd36d7a56fa7a3fd4f6c57c5d1a
fix Issue 11974 - ICE(cast.c) Segfault with invalid assignment

https://github.com/D-Programming-Language/dmd/commit/6f22eda03e133f2d2bf78a3544099ccef36fd2be
Merge pull request #3141 from 9rnsr/fix11974

Issue 11974 - ICE(cast.c) Segfault with invalid assignment

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


[Issue 11975] Compile time error on null dereference

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11975


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com
   Platform|x86_64  |All
Version|unspecified |D2
Summary|DMD64 D Compiler|Compile time error on null
   |v2.065-devel-3b37a57|dereference
   |crashes for simple  |
   |inheritance |
 OS/Version|Linux   |All
   Severity|blocker |enhancement


--- Comment #4 from yebblies yebbl...@gmail.com 2014-01-23 18:18:50 EST ---
(In reply to comment #3)
 Why is the compiler not able to tell me the problem and I need to go through a
 segfault ?
 
 Regards, Sumit

The analysis to detect this has not been implemented, and there is some
question as to whether it is worth implementing given how easy it is to
identify the source of the segfault in a debugger.

It will actually detect this simple case if you compile with -O.

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


[Issue 11974] ICE(cast.c) Segfault with invalid assignment

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11974


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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


[Issue 10959] std.algorithm.remove is highly bug-prone

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=10959



--- Comment #10 from monarchdo...@gmail.com 2014-01-22 23:22:14 PST ---
(In reply to comment #9)
 I've just given up on this idiom, instead using:
 
 ```
 import std.algorithm;
 import std.stdio;
 
 void main() {
 auto items = [10, 20, 30];
 auto t = items.filter!(x = x != 20).copy(items);
 items = items[0 .. $ - t.length];
 
 writeln(items);
 }
 ```
 
 Its the only option that has clear time and space semantics.
 
 Ref: http://dpaste.dzfl.pl/84273326

How is that any different from:
items = items.remove!(x = x == 20)()
?

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


[Issue 11946] need 'this' to access member when passing field to template parameter

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11946



--- Comment #8 from Kenji Hara k.hara...@gmail.com 2014-01-22 23:41:23 PST ---
(In reply to comment #7)
  It's increasing consistency with currently known language concepts:
 
 Yes, this is all fine and well, but it does not justify making code that 
 worked
 before now break with an indecipherable error message! The message need 
 'this'
 to access member f is an outright lie and is only good at showing a glaring
 compiler implementation problem.

There's no lie. The instantiated function _always_ needs valid runtime context,
*regardless* the context is really used or not inside function body.

Unfortunately current D has _no_ language feature to remove unused context
pointer (I call it nested-ness inference).

 (In reply to comment #1)
  template f(alias X)
  {
  static string f()
  {
  //int x = X;
  return X.stringof; // OK
  }
  }
 
 This just shows another bug - that you still need static (which makes NO
 sense for a free function, templated or not), but now you must hide it inside 
 a
 template!

It's not a bug. If the symbol X needs runtime context ('this' object or
function frame), f() will be instantiated like as member function or nested
function. To remove the implicit context pointer, 'static' will work.

---
After fixing issue 11533, these two declarations have different meanings.

template f(alias X) { static string f() { return null; } }  // A
static template f(alias X) { string f() { return null; } }  // B

In A, 'static' attribute is always added to the instantiated function 'f'. So
Even if X requires runtime context, 'f' still cannot access it.
In B, 'static' attribute is added _if_ X has no runtime context. If X needs
runtime context, instantiated 'f' also take the context to access valid runtime
storage of X.
---

  To be more precise, current D language alias template parameter is not 
  designed
  just to take a symbol that is needed just only at compile-time.
  If given template argument has implicit runtime context, compiler will 
  _always_
  try to take runtime context at the same time.
 
 So fix this first before breaking code?

It would be a not trivial language enhancement that still not yet designed.

  To ignore the implicit automatic capturing, you need to write the idiom I
  explained in comment#1.
 
 If one needs to go to a bugtracker and learn of a hacky workaround (put a
 static function in a template) from a compiler developer to make their code
 compile, this is a terrible situation for D.

To explain the behavior, I'll update webside documentation and add a section in
release note. 

  As a conclusion: the reported breaking change is necessary due to add more
  consistency to the language spec.
 
 I suggest that consistency bugs are fixed only after there is an immediate and
 obvious way to transition code that should not have compiled, to correct code
 which functions in the same way.

I already explained the way to do it in comment#1.

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


[Issue 11946] need 'this' to access member when passing field to template parameter

2014-01-22 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=11946



--- Comment #9 from Vladimir Panteleev thecybersha...@gmail.com 2014-01-23 
09:53:40 EET ---
(In reply to comment #8)
 (In reply to comment #7)
   It's increasing consistency with currently known language concepts:
  
  Yes, this is all fine and well, but it does not justify making code that 
  worked
  before now break with an indecipherable error message! The message need 
  'this'
  to access member f is an outright lie and is only good at showing a glaring
  compiler implementation problem.
 
 There's no lie. The instantiated function _always_ needs valid runtime 
 context,
 *regardless* the context is really used or not inside function body.

What?!?!?

This makes absolutely no sense!

There is nothing in the D spec about this! Templated functions must behave in
the same way as free functions (whether the function itself is templated or it
is inside an explicit template declaration), and static is meaningless on
free functions!

We are not talking about template mixins! The instantiation of non-mixin
templates uses the template declaration's context!

 Unfortunately current D has _no_ language feature to remove unused context
 pointer (I call it nested-ness inference).

As far as I can see, this is just a compiler implementation detail!

Can you provide an example where this feature (passing context pointer from
template instantiation site to a free function) is actually used?

 It's not a bug. If the symbol X needs runtime context ('this' object or
 function frame), 

It doesn't! .stringof does not need a gosh-darn context pointer!

 f() will be instantiated like as member function or nested
 function. 

WHY?!?

It is a free function!

 To remove the implicit context pointer, 'static' will work.

...

 After fixing issue 11533, these two declarations have different meanings.
 
 template f(alias X) { static string f() { return null; } }  // A
 static template f(alias X) { string f() { return null; } }  // B
 
 In A, 'static' attribute is always added to the instantiated function 'f'. So
 Even if X requires runtime context, 'f' still cannot access it.
 In B, 'static' attribute is added _if_ X has no runtime context. If X needs
 runtime context, instantiated 'f' also take the context to access valid 
 runtime
 storage of X.

This looks like absurd overcomplication. Do you really expect D users to have
to understand the difference?

 It would be a not trivial language enhancement that still not yet designed.

Then I suggest that you postpone all breaking changes until all that is figured
out. Breaking code to clean up compiler internals is inexcusable, IMO!

 To explain the behavior, I'll update webside documentation and add a section 
 in
 release note. 

The more I think about it the less sense it makes to me. Maybe it makes sense
from the point of view of a compiler developer (to use Chen Raymond's
phraseology, you're looking at the world through compiler-tinted glasses).
But as a D user, your explanation reads like one giant WTF to me. It is
completely unintuitive and to me it seems that things are broken at a much more
fundamental level if you defend the current logic in this way.

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