[Issue 16503] New: [ndslice] prevents fastmath LDC attribute

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16503

  Issue ID: 16503
   Summary: [ndslice] prevents fastmath LDC attribute
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: major
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: ilyayaroshe...@gmail.com

Slice
{
  front
  opIndex
  ptr
  ...
}

auto sl1 = slice!double(...);
auto sl2 = slice!double(...);

@fastmath ... {
  // loop for strides == 1
c += sl1.ptr[i] * sl2.ptr[i];
}

c's computation can not be fully optimized because Slice primitives has not
fastmath attribute.
In the same time this is safe TODO:

Slice
{
@fastmath:
  front
  opIndex
  ...
}

auto sl = slice!double(...);

... { // no fastmath
  // loop for strides == 1
c += sl1.ptr[i] * sl2.ptr[i];
}

No optimisations in the last case.

So, we can just mark all ndslice except mapSlice as @fastmath :-)

--


[Issue 16502] New: spawnProcess does not throw on exec errors

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16502

  Issue ID: 16502
   Summary: spawnProcess does not throw on exec errors
   Product: D
   Version: D2
  Hardware: All
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: freeslav...@gmail.com

I chose Linux as OS for this issue, but it's legitimate for all Posix.

spawnProcess does not implement proper reporting of errors from exec.
This leads to the situations when execve fails, but spawnProcess does not
throw.
spawnProcess has some checks before fork, but these are not enough.

E.g. create empty file and mark it as executable

touch notreallyexecutable
chmod +x notreallyexecutable

Then write D program:

import std.process;

void main(string[] args)
{
spawnProcess(args[1]);
}

Compile and run:

dmd test.d
./test ./notreallyexecutable

It will not throw.

Error reporting can be implemented via pipe. Open pipe on parent side with
CLOEXEC. It will be inherited in fork. In case of exec errors write some code
to the pipe, e.g. errno code. On success pipe will be closed automatically.
On parent side read from pipe. In case of errors there will be errno code,
otherwise nothing.

--


[Issue 15341] segfault with std.signals slots

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15341

--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/978574006c8b3c79cdf08eaecac90e45d215fa9f
Fixes issue 15341 - detachDisposeEvent called even
with remaining connected slots for that instance

https://github.com/dlang/phobos/commit/2ccfbcccab6f121681e4c6727389e469cfe850db
Merge pull request #4441 from Dechcaudron/15341

Fixes issue 15341

--


[Issue 15341] segfault with std.signals slots

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15341

github-bugzi...@puremagic.com changed:

   What|Removed |Added

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

--


[Issue 16501] New: packed ndslices does not compile

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16501

  Issue ID: 16501
   Summary: packed ndslices does not compile
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: ilyayaroshe...@gmail.com

unittest
{
import std.experimental.ndslice;
alias sab = sliced!("a", "b");
auto sl = sab(new double[12], new double[12], 3, 4);
auto psl = sl.pack!1;
}

--


[Issue 15857] incorrect checkimports mismatch for overload sets

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15857

--- Comment #14 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/c5822394c89c98a8855302164433acf6db09208b
fix Issue 15857 - incorrect checkimports mismatch for overloadsets

- properly fix Issue 15857 by comparing overload sets for equality
  (see 082e1199c258e99f7867ca33509db9ae9a31f3ae or #5681 for the previous fix)
- caching them in the local symbol table doesn't fully fix the issue b/c the
  table is not checked w/ SearchImportsOnly (see added test case)
- also with -transition=checkimports adding an overload set to the local
  symbol table will return that overload set for locals only searches,
  even though it might contain imported overloads (see readded dip22e
deprecation)
- might still make sense to correctly cache overload sets at some point,
  but they shouldn't be that common

https://github.com/dlang/dmd/commit/9ef10b73175ffb5ba6c638eef77bcdb243115026
Merge pull request #6136 from MartinNowak/fix15857

fix Issue 15857 - incorrect checkimports mismatch for overloadsets

--


[Issue 16072] std.container.binaryheap should be extendable for arrays

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16072

--- Comment #1 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/71f01c961de1e710250aee77e00c07839e7b68e3
fix issue 16072 - container.binaryheap should be extendable for arrays

https://github.com/dlang/phobos/commit/6ca3017b9188caca204ed43dade7c851f86e6866
Merge pull request #4359 from wilzbach/fix_16072

fix issue 16072 - container.binaryheap should be extendable for arrays

--


[Issue 3573] pure and nothrow allow function return type to be inferred

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3573

Bolpat  changed:

   What|Removed |Added

 CC||qs.il.paperi...@gmail.com

--- Comment #3 from Bolpat  ---
Isn't 1. a feature?

--


[Issue 16500] New: inferred != annotated pure

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16500

  Issue ID: 16500
   Summary: inferred != annotated pure
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: qs.il.paperi...@gmail.com

struct X(T)
{
this(S)(in S[] arr) // inferred pure
{ }
}

void main() pure
{
X!uint mut = [ 1, 2 ]; // proves inference (cf. main is pure)
// immutable X!uint imm1 = [ 1, 2 ];
// auto imm2 = immutable X!uint([1, 2]);
}

The last lines don't compile. However, they do if the inferred pure is
explicitly annotated.

>From the discussion
https://forum.dlang.org/post/seuujamznrzqygrrp...@forum.dlang.org

--


[Issue 15857] incorrect checkimports mismatch for overload sets

2016-09-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15857

--- Comment #13 from Martin Nowak  ---
https://github.com/dlang/dmd/pull/6136

--