[Issue 15457] Symbol Undefined __lseeki64

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15457

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15457] Symbol Undefined __lseeki64

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15457

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

https://github.com/D-Programming-Language/phobos/commit/1b6cf80232f19e581f72869a4b339580416dd72d
fix Issue 15457 - Symbol Undefined __lseeki64

https://github.com/D-Programming-Language/phobos/commit/e29c39db0354f01bf1fc1b57f2c35131d8982bda
Merge pull request #4095 from WalterBright/fix15457

fix Issue 15457 - Symbol Undefined __lseeki64

--


[Issue 15573] -O -inline causes wrong code with idiv instruction

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15573

yebblies  changed:

   What|Removed |Added

   Keywords||pull
 OS|Linux   |All

--- Comment #31 from yebblies  ---
Found it: https://github.com/D-Programming-Language/dmd/pull/5559

--


[Issue 15573] -O -inline causes wrong code with idiv instruction

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15573

--- Comment #32 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/6210867ef1024bf29d5b0342cf31dd511380a24a
Fix Issue 15573 - -O -inline causes wrong code with idiv instruction

https://github.com/D-Programming-Language/dmd/commit/766073e4740983906505ebbff9a833d5fe713081
Merge pull request #5559 from yebblies/issue15573

Issue 15573 - -O -inline causes wrong code with idiv instruction

--


[Issue 15619] [REG 2.066] Floating-point x86_64 codegen regression, when involving array ops

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15619

yebblies  changed:

   What|Removed |Added

 CC||yebbl...@gmail.com
  Component|dmd |druntime

--- Comment #3 from yebblies  ---
The array operation uses xmm6/xmm7 internally without saving them, but they are
callee saved on win64.

Probably introduced by this:
https://github.com/D-Programming-Language/druntime/pull/829

--


[Issue 13457] float version of isIdentical fails

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13457

yebblies  changed:

   What|Removed |Added

 CC||yebbl...@gmail.com

--- Comment #2 from yebblies  ---
Can anyone reproduce this with the latest compiler?

--


[Issue 15815] [REG2.071-devel] deprecation for aliased template instance not shown

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15815

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

https://github.com/D-Programming-Language/dmd/commit/e9a67955f0d0d63b903423dd9a6f6aaa8f7d2470
fix Issue 15815 - deprecation for aliased template instance not shown

Run `type.resolve` always even when `s` is an `AggregateDeclaration` -
`(s.getType() && type.equals(s.getType())) == true`

https://github.com/D-Programming-Language/dmd/commit/d2c759f54f48e5159a962050b33481b0e26ea030
Merge pull request #5558 from 9rnsr/fix15815

[REG2.071-devel] Issue 15815 - deprecation for aliased template instance not
shown

--


[Issue 15791] Cannot get a stored nested struct object from Variant

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15791

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15791] Cannot get a stored nested struct object from Variant

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15791

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

https://github.com/D-Programming-Language/phobos/commit/22c8065ffdf599f5dcf760d984dc5c309016d46f
fix Issue 15791 - Cannot get a stored nested struct object from Variant

https://github.com/D-Programming-Language/phobos/commit/7ebdd9354b4ebf723cfb9b86401ead0783c5d003
Merge pull request #4074 from 9rnsr/fix15791

Issue 15791 - Cannot get a stored nested struct object from Variant

--


[Issue 15809] Putting std.stdio.File.ByLine in a class causes Invalid memory operation upon exit

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15809

hst...@quickfur.ath.cx changed:

   What|Removed |Added

Summary|Putting |Putting
   |std.stdio.File.ByLine ina   |std.stdio.File.ByLine in a
   |class causes Invalid memory |class causes Invalid memory
   |operation upon exit |operation upon exit

--


[Issue 15619] [REG 2.066] Floating-point x86_64 codegen regression, when involving array ops

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15619

Martin Nowak  changed:

   What|Removed |Added

 CC||c...@dawg.eu
   Assignee|nob...@puremagic.com|c...@dawg.eu

--- Comment #4 from Martin Nowak  ---
I'll take this.
https://trello.com/c/TNCQ6xBk/171-issue-15619-reg-2-066-floating-point-x86-64-codegen-regression-when-involving-array-ops

--


[Issue 15573] -O -inline causes wrong code with idiv instruction

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15573

--- Comment #33 from github-bugzi...@puremagic.com ---
Commit pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/30ec03499244697e8c691c29e058c76d1571c4ec
Merge pull request #5559 from yebblies/issue15573

Issue 15573 - -O -inline causes wrong code with idiv instruction

--


[Issue 15594] Make all of std.json @safe-friendly

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15594

--- Comment #1 from Chris Wright  ---
The .object() and .array() methods are not and cannot be @safe or @trusted
because they return by reference. Observe:

---
void main()
{
  JSONValue v;
  v.type = JSON_TYPE.OBJECT;
  auto o = &v.object();
  v.str = "overwrite";
  (*o)["world"] = "i hope this works";
}
---

This will, naturally, end in a segmentation fault.

A different strategy is to create a @safe / @trusted DiscriminatedUnion
template in std.typecons and use that. We'd have to expose @system methods to
retrieve items by reference to make .object and .array continue to work, which
is kind of ugly.

Anyway, making str() @trusted and adding a couple @trusted methods, objectNoRef
and arrayNoRef, mostly works.

The main problem is iteration. The options are:
 * opApply is @system. That sucks.
 * opApply is @safe. That means you can only use it in @safe code.
 * Provide @safe and @system overloads. The compiler isn't smart enough to use
the right one with foreach syntax.
 * Switch to ranges. I can only transparently do this with arrays *or* objects,
not both, so this is also a breaking change.
 * opApply is @system. Use .array and .object in @safe code. Oh wait, they're
@system because they return by reference. Expose .arrayNoRef and .objectNoRef
instead. That's kind of crufty but works.
 * Expose .arrayNoRef and .objectNoRef, deprecate .array and .object, and
eventually replace them with the NoRef variants.

--


[Issue 15782] [Reg 2.071-devel] Alias no longer strips qualifiers from user defined types

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15782

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 15782] [Reg 2.071-devel] Alias no longer strips qualifiers from user defined types

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15782

--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/5fb53481fccbe800f083aeaa867d0dd541efbe67
fix Issue 15782 - Alias no longer strips qualifiers from user defined types

- introduce OldAlias for internal usage
- deprecate unqualifying of UDTs
- unfortunately deprecation message isn't shown in many use-cases

https://github.com/D-Programming-Language/phobos/commit/fed12920a6bfc6cbb37da8e7568cf555005632f1
Merge pull request #4094 from MartinNowak/fix15782

fix Issue 15782 - Alias no longer strips qualifiers from user defined types

--


[Issue 7972] std.file.read allocate a buffer the size of the file even when given a upper limit

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7972

Ender KaShae  changed:

   What|Removed |Added

 CC||astrotha...@gmail.com
   Assignee|nob...@puremagic.com|astrotha...@gmail.com

--


[Issue 15324] symbol is already defined / size of symbol changed

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15324

--- Comment #5 from Iain Buclaw  ---
I don't think it's a compiler bug, but it would help indefinitely if only the
compiler semantic passes checked for conflicting function overrides upon
declaration, rather than when they are called.

I can distil test case down to:

---
struct MultiIndexContainer()
{
bool contains(int k) const
{
auto r = true;
return r;
}

bool contains(int k) const
{
return false;
}
}

void main()
{  
MultiIndexContainer!() m;
}

---

If these were not templates, you'd get multiple definition errors.  But as that
is not the case, these instead get put on comdat and merged. This as you've
discovered gives you an entirely different kind of linker error, but it's
simply a different side of the same coin.

The real bug is in the program logic.  Somehow, you have done the following
(abridged)
---
alias Value ValueView;
alias typeof(Value.init) KeyType;
bool contains(ValueView value) const { ... }
bool contains(KeyType k) const { ... }
---

You should add a constraint to ensure that ValueView != KeyType, or rename the
methods so as they don't conflict, such as containsValue() and containsKey().

--


[Issue 15720] iota(long.max, long.min, step) does not work properly

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15720

Ender KaShae  changed:

   What|Removed |Added

 CC||astrotha...@gmail.com

--- Comment #1 from Ender KaShae  ---
This happens because the operation to compute the length is

```
unsigned((start - stop) / -step)
```

but `long.max - long.min` overflows the long and results in -1. 

The reason it works for a step of 1 is that -1 is cast to a ulong, which
results in the maximum value of ulong (18446744073709551615). 

Maybe this could be fixed by casting to the unsigned type before dividing by
the step.

--


[Issue 7972] std.file.read allocate a buffer the size of the file even when given a upper limit

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7972

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

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 7972] std.file.read allocate a buffer the size of the file even when given a upper limit

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7972

--- Comment #2 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/832928adafe372b7fd920b0d7c2e2cf433984b47
Don't allocate more than upTo bytes in std.file.read

Fixes Issue 7972

--


[Issue 15816] New: ICE void ddmd.dclass.__assert(int) with error: anonymous classes not allowed

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15816

  Issue ID: 15816
   Summary: ICE void ddmd.dclass.__assert(int) with error:
anonymous classes not allowed
   Product: D
   Version: D2
  Hardware: x86
OS: Mac OS X
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: timothee.co...@gmail.com

reduced test case: see
https://github.com/ldc-developers/ldc/issues/1370#issuecomment-199060304

--


[Issue 15816] ICE void ddmd.dclass.__assert(int) with error: anonymous classes not allowed

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15816

Timothee Cour  changed:

   What|Removed |Added

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

--- Comment #1 from Timothee Cour  ---
dmd -of=/tmp/d07/temp  -o- -c fun1.d


fun2.d(1): Error: anonymous classes not allowed
core.exception.AssertError@dclass.d(428): Assertion failure

4   dmd 0x00010022650c _d_assert + 104
5   dmd 0x0001210a void
ddmd.dclass.__assert(int) + 38
6   dmd 0x00010002d8ca
_ZN16ClassDeclaration8semanticEP5Scope + 242
7   dmd 0x000100052b3f
_ZN6Module8semanticEv + 111
8   dmd 0x00010003a230
_ZN6Import8semanticEP5Scope + 416
9   dmd 0x00010002ed8e
_ZN16ClassDeclaration8semanticEP5Scope + 5558
10  dmd 0x000100052b3f
_ZN6Module8semanticEv + 111
11  dmd 0x0001000d0552 _Z7tryMainmPPKc +
13834
12  dmd 0x000131f2 _Dmain + 38
13  dmd 0x000100235627
D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 39
14  dmd 0x00010023555f void
rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate()) + 55
15  dmd 0x0001002355cc void
rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()
+ 44
16  dmd 0x00010023555f void
rt.dmain2._d_run_main(int, char**, extern (C) int
function(char[][])*).tryExec(scope void delegate()) + 55
17  dmd 0x0001002354b1 _d_run_main + 497
18  dmd 0x0001328b main + 15
19  dmd 0x00011817 _start + 229
20  dmd 0x00011730 start + 32
21  ??? 0x0004 0x0 + 4

--


[Issue 15798] std.algorithm.mutation.copy takes target by value

2016-03-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15798

Ender KaShae  changed:

   What|Removed |Added

 CC||astrotha...@gmail.com

--- Comment #1 from Ender KaShae  ---
Simply changing the Target to a ref wouldn't be backward compatible, because
then it wouldn't be possible to use an rvalue as a target, which is useful for
copying to an array slice, or using a range that wraps another output range,
such as retro. 

Also, std.range.put _does_ take a reference, and can be used to copy a range.
Alternatively, copy returns the state of the output range after copying, so in
the MD5 example you could use `s.copy(d2).finish().toHexString` to get the
correct MD5 sum.

--