[Issue 15629] [REG2.066.0] wrong code with "-O -inline" but correct with "-O"

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15629

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #6 from Walter Bright  ---
Comment 3 further reduces to:

 void main() {
int[] a = [3];
int value = a[0] >= 0 ? a[0] : -a[0];
assert(a[0] == 3);
writeln(value, a);
 }

void writeln(int v, int[] a) {
 }

and only -O is needed (not -inline).

--


[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624

--- Comment #10 from Vladimir Panteleev  ---
(In reply to Walter Bright from comment #8)
> Works for me, but added the test case to the test suite.

According to Digger, it was fixed by
https://github.com/D-Programming-Language/dmd/pull/5109

--


[Issue 12507] SysTime.init.toString should not segfault

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12507
Issue 12507 depends on issue 12624, which changed state.

Issue 12624 Summary: [REG 2.064] Internal error: backend\cgobj.c 2313 with 
Rebindable!(immutable TimeZone) in std.datetime
https://issues.dlang.org/show_bug.cgi?id=12624

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--


[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624

Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--


[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624

--- Comment #9 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ebf5dfc90d00c7c693ba50c25e38bce15ddd7827
add test cases for issue 12624

https://github.com/D-Programming-Language/dmd/commit/4f4fe9dcc83dd85b08d95d077bd194c5c1ef3647
Merge pull request #5658 from WalterBright/test12624

add test cases for issue 12624

--


[Issue 15923] New: is expression qualifier matching does not work with multiple qualifiers

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15923

  Issue ID: 15923
   Summary: is expression qualifier matching does not work with
multiple qualifiers
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: and...@erdani.com

Consider:

alias T = shared(const int);
static if (is(T == shared(U), U))
pragma(msg, "works");
else
static assert(0, "does not work");

This fails to compile. The compiler should peel the "shared" and bind U to
const int. This code does work:

alias T = shared(const int);
static if (is(T == shared(const(U)), U))
pragma(msg, "works");
else
static assert(0, "does not work");

--


[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624

--- Comment #8 from Walter Bright  ---
Works for me, but added the test case to the test suite.

--


[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #7 from Walter Bright  ---
https://github.com/D-Programming-Language/dmd/pull/5658

--


[Issue 15922] New: DMD segfault in functionParameters()

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15922

  Issue ID: 15922
   Summary: DMD segfault in functionParameters()
   Product: D
   Version: D2
  Hardware: x86_64
   URL: https://gist.github.com/Hackerpilot/ba992214296597698a
2c455dbf4abaff
OS: Linux
Status: NEW
  Keywords: ice-on-invalid-code, industry
  Severity: major
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: briancsch...@gmail.com

Dmd segfaults when compiling this code:

template StorageAttributes(Store)
{
enum hasInsertMethod = Store.insert;
enum hasFullSlice = Store.init[];
}
struct ValidSparseDataStore(DataT)
{
DataT insert()
{
correctedInsert!(false);
}
DataT correctedInsert(bool CorrectParents)() {}
auto opSlice() inout {}
}
alias BasicCubeT = StorageAttributes!(ValidSparseDataStore!int);

--


[Issue 3410] std.stdio.File.tell() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3410

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Andrei Alexandrescu  ---
And this as well!

--


[Issue 3409] stdio.File.seek() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3409

Andrei Alexandrescu  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Andrei Alexandrescu  ---
I'll just close then. Thx!

--


[Issue 3409] stdio.File.seek() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3409

Simen Kjaeraas  changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com

--- Comment #10 from Simen Kjaeraas  ---
This was fixed in https://github.com/D-Programming-Language/phobos/pull/3828.

--


[Issue 3410] std.stdio.File.tell() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3410

Simen Kjaeraas  changed:

   What|Removed |Added

 CC||simen.kja...@gmail.com

--- Comment #4 from Simen Kjaeraas  ---
This was fixed in https://github.com/D-Programming-Language/phobos/pull/3828.

--


[Issue 15920] std.traits.MemberFunctionsTuple gives a wrong result

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15920

Simen Kjaeraas  changed:

   What|Removed |Added

   Keywords||pull
 CC||simen.kja...@gmail.com

--- Comment #1 from Simen Kjaeraas  ---
MemberFunctionsTuple was unaware that isCovariant(a, b) does not preclude
isCovariant(b, a). After a little update, it now knows.

Pull:

https://github.com/D-Programming-Language/phobos/pull/4195

--


[Issue 15921] Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921

ag0ae...@gmail.com changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||ag0ae...@gmail.com

--


[Issue 15921] Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921

ref2401  changed:

   What|Removed |Added

 CC||refacto...@gmail.com

--


[Issue 15921] Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921

ref2401  changed:

   What|Removed |Added

   Severity|enhancement |major

--


[Issue 15921] New: Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921

  Issue ID: 15921
   Summary: Win64: wrong codegen with array of structs slicing
   Product: D
   Version: D2
  Hardware: x86_64
OS: Windows
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: refacto...@gmail.com

Array setting behaviour produces wrong results.

OS: Win 8.1 Pro
DMD: v2.071.0
Build-cmd: dmd main.d -ofconsole-app.exe -debug -unittest -g -wi -m64

module dmain;
import std.stdio;

struct Vec {
float a;
}

void main(string[] args) {
Vec[] array = new Vec[4];

writeln("before: ", array); //  prints [Vec(nan), Vec(nan), Vec(nan),
Vec(nan)]

array[] = Vec(24);

writeln("after: ", array); // prints [Vec(0), Vec(0), Vec(0), Vec(0)]
}

Seems like slicing is broken in general. All the following variations produce
different results but they are all wrong.
array[] = Vec(24);
array[0 .. 1] = Vec(24);
array[0 .. $] = Vec(24);

It works as expected if I do one of the following things:
1. Get rid of -m64. If I compile with -m32 flag then I cannot replicate the
issue.

2. Changing the type of the Vec.a field from float to real, int, uint, long,
ulong fixes the issue. Double still causes the issues.

3. Adding new fields to the Vec struct.

3.1. Vec {float a, b; } still does not work but the result is slightly
different.
array[] = Vec(24, 5);
writeln("after: ", array); // [Vec(5, 0), Vec(5, 0), Vec(5, 0), Vec(5, 0)]

3.2. Vec { float a, b, c; } works fine.

4. Using index operator: array[0] = Vec(24) works fine

--


[Issue 15910] Prevent mismatch of VERSION information in dmd releases

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15910

--- Comment #3 from Joseph Rushton Wakeling  ---
Unfortunately, the proposed workaround didn't work for me when I tried it.

If when trying to build phobos I use,

make -f posix.mak VERSION=2.071

then I wind up with generated library files:

libphobos2.so -> libphobos2.so.0..
libphobos2.so.0. -> libphobos2.so.0..
libphobos2.so.0..
libphobos2.so.0..o

... when obviously I'd expect the names to be so.0.71.0 etc.

Tweaking to e.g. VERSION=2.071.0 makes no difference, it looks like phobos'
build scripts just can't handle a custom VERSION override like this.

--


[Issue 15920] New: std.traits.MemberFunctionsTuple gives a wrong result

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15920

  Issue ID: 15920
   Summary: std.traits.MemberFunctionsTuple gives a wrong result
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: goldmax3...@gmail.com

module start;
import std.traits;
import std.typetuple;
class A
{
void f(){}
void f(int){}
}
class B : A
{
override void f(){}
override void f(int){}
}
pragma(msg, staticMap!(fullyQualifiedName, MemberFunctionsTuple!(B,"f")));

prints

tuple("start.B.f", "start.A.f")

--


[Issue 15919] Undetected spell miss in ndslice.selection.reshape()

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15919

greenify  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #1 from greenify  ---
Development for Ndslice happens at mir.dlang.io - you probably want to open
your bug there ;-)

--


[Issue 15898] [REG2.069] Internal error: backend\cgcod.c 1651

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15898

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--- Comment #2 from Walter Bright  ---
https://github.com/D-Programming-Language/dmd/pull/5656

--