[Issue 19717] case of segfault due to undetected forward reference

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19717

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@Basile-z created dlang/dmd pull request #9412 "fix issue 19717 -  case of
segfault due to undetected forward reference" fixing this issue:

- fix issue 19717 -  case of segfault due to undetected forward reference

https://github.com/dlang/dmd/pull/9412

--


[Issue 19717] case of segfault due to undetected forward reference

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19717

Basile-z  changed:

   What|Removed |Added

Summary|ICE/segfault when using |case of segfault due to
   |__traits(getMember) on  |undetected forward
   |overloaded function with|reference
   |"undefined identifier"  |
   |error   |

--


[Issue 19717] ICE/segfault when using __traits(getMember) on overloaded function with "undefined identifier" error

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19717

--- Comment #1 from Basile-z  ---
That's a forward ref not detected. If you put the enum decl after foo()
overloads it exits with a normal program error.

--


[Issue 19717] ICE/segfault when using __traits(getMember) on overloaded function with "undefined identifier" error

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19717

Basile-z  changed:

   What|Removed |Added

   Keywords||ice
 CC||b2.t...@gmx.com

--


[Issue 19563] extern(C++) Incorrect ABI passing small struct

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19563

--- Comment #3 from Manu  ---
This bug blocks the druntime `std::string` PR.

--


[Issue 19563] extern(C++) Incorrect ABI passing small struct

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19563

--- Comment #2 from Manu  ---
If anyone knows how to fix this; here's a head-start:

  https://github.com/dlang/dmd/pull/9411

That commits the unit-test which needs to work.

--


[Issue 19179] extern(C++) small-struct by-val uses wrong ABI

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19179

--- Comment #3 from Manu  ---
I think what should probably happen here, is that while the type in D is POD,
the counterpart in C++ is not POD because default initialisation generates a
constructor.

Perhaps the proper solution is to make the D struct emit a default constructor
(this just assign's init), and also force the type to use the non-POD ABI?
This way semantics will match C++, and if the C++ class externs to the default
constructor; it will link as they expect.

--


[Issue 19710] template parameters not deduced when one is is a supplied string, and the other inferred.

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19710

--- Comment #2 from Alex  ---
The solution I found was to make two versions of this attribute function with
different names.
One for structs and one for classes.

The ref is necessary to have it work for structs.

The ref fails when used with 'this' in classes.

I think the underlying problem is that in the class version, the ref refers to
the object reference (pointer), not the object pointed to, so the ref is
unnecessary, and in the case where this is passed, illegal.

In the struct version, the ref refers to the object itself, and is necessary to
prevent it being copied and operations happening to a local version.

This is a bit unfortunate, it would be nice to have a template that could work
with either.

--


[Issue 19717] New: ICE/segfault when using __traits(getMember) on overloaded function with "undefined identifier" error

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19717

  Issue ID: 19717
   Summary: ICE/segfault when using __traits(getMember) on
overloaded function with "undefined identifier" error
   Product: D
   Version: D2
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: elpenguin...@gmail.com

Reduced code:
```
enum bar = __traits(getMember, mixin(__MODULE__), "foo");

auto foo() {
return foo();
}

void foo(Foo) {}
```
This also prints a misleading error: `Error: cannot overload both property and
non-property functions`

The error appears to have been introduced after DMD 2.070.2.

--


[Issue 19716] activate and activate.fish scripts do not add MANPATH

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19716

--- Comment #2 from Dlang Bot  ---
@bolry created dlang/installer pull request #367 "Issue 19716 Add MANPATH to
activate(.fish)" mentioning this issue:

- Issue 19716 Add MANPATH to activate(.fish)

https://github.com/dlang/installer/pull/367

--


[Issue 19716] activate and activate.fish scripts do not add MANPATH

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19716

Bo Rydberg  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|nob...@puremagic.com|dl...@rydb3rg.com

--- Comment #1 from Bo Rydberg  ---
Created attachment 1734
  --> https://issues.dlang.org/attachment.cgi?id=1734=edit
Patch to add MANPATH in install.sh

--


[Issue 19716] New: activate and activate.fish scripts do not add MANPATH

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19716

  Issue ID: 19716
   Summary: activate and activate.fish scripts do not add MANPATH
   Product: D
   Version: D2
  Hardware: All
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P1
 Component: installer
  Assignee: nob...@puremagic.com
  Reporter: dl...@rydb3rg.com

After use of `source ~/dlang/dmd-2.085.0/activate` and/or `source
~/dlang/dmd-2.085.0/activate.fish` they do not include the MANPATH environment
variable, thus unable to look up, e.g., man rdmd, man dmd, or man dmd.conf.

Suggest modifying `script/install.sh` to add MANPATH to activate source
scripts.

--


[Issue 19714] Invalid memory operation in class destructor

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19714

Seweryn  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Severity|blocker |trivial

--


[Issue 19714] Invalid memory operation in class destructor

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19714

--- Comment #3 from Seweryn  ---
Here are some information about the problem

https://wiki.dlang.org/InvalidMemoryOperationError

--


[Issue 19714] Invalid memory operation in class destructor

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19714

--- Comment #2 from Seweryn  ---
OK, thanks.
I did not expect that behavior.

--


[Issue 19715] New: AutoImplement `self` and `parent` aliases are incorrect for overloaded functions

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19715

  Issue ID: 19715
   Summary: AutoImplement `self` and `parent` aliases are
incorrect for overloaded functions
   Product: D
   Version: D2
  Hardware: x86
OS: All
Status: NEW
  Severity: minor
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: htven...@gmail.com

The aliases `self` and `parent` are both declared by aliasing the function by
name. For overloaded functions this means the overloads is aliased, not the
exact function being implemented. This is not a problem when just calling
`self` or `parent`, but for reflection purposes it is.

The following should work, but doesn't:

--
import std.typecons : AutoImplement;

interface A
{
void overloaded(int);
void overloaded(float);
}

enum tpl(C, alias fun) = q{
import std.traits : Parameters;
static assert(is(Parameters!self == typeof(args)));
};

alias Impl = AutoImplement!(A, tpl);
--

Output:

$ dmd -o- -c autoimplement.d
/Library/D/dmd/src/phobos/std/typecons.d-mixin-4495(4510): Error: static
assert:  is((int) == (float)) is false
autoimplement.d(14):instantiated from here: AutoImplement!(A, tpl,
isAbstractFunction)

--


[Issue 19714] Invalid memory operation in class destructor

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19714

Adam D. Ruppe  changed:

   What|Removed |Added

 CC||destructiona...@gmail.com

--- Comment #1 from Adam D. Ruppe  ---
That bug is in your code: you are allocating a new string while the garbage
collector is running. The exception is telling you to not do that.

I don't know where that's documented though...

--


[Issue 19714] New: Invalid memory operation in class destructor

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19714

  Issue ID: 19714
   Summary: Invalid memory operation in class destructor
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: blocker
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: seweryn.kamin...@gmail.com

Created attachment 1733
  --> https://issues.dlang.org/attachment.cgi?id=1733=edit
Sample minimalistic code with runtime error

Output of attached example:
core.exception.InvalidMemoryOperationError@src/core/exception.d(729): Invalid
memory operation

--


[Issue 19594] Compiler Crash

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19594

--- Comment #5 from Basile-z  ---
The SSL certificate of your repo is not valid.

$ git clone https://gitlab.vahanus.com/dlang/examples/filescanner.git
Clonage dans 'filescanner'...
fatal: unable to access
'https://gitlab.vahanus.com/dlang/examples/filescanner.git/': SSL certificate
problem: unable to get local issuer certificate

--


[Issue 17651] Segfault when parsing Ddoc ESCAPES macro

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17651

Dlang Bot  changed:

   What|Removed |Added

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

--- Comment #2 from Dlang Bot  ---
dlang/dmd pull request #9407 "fix issue 17651 - Segfault when parsing Ddoc
ESCAPES macro" was merged into master:

- ee6e6faf8819a39f0c4aa95c4cc89f9eb3af0c95 by Basile Burg:
  fix issue 17651 - Segfault when parsing Ddoc ESCAPES macro

https://github.com/dlang/dmd/pull/9407

--


[Issue 19666] Compiler executes illegal instruction casting array to struct pointer

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19666

--- Comment #2 from Basile-z  ---
reduced:

---
struct StoreAny {
ubyte[16] store;
this(T)(T value) {
*(cast(T*) store) = value;
}
}

struct SomeStruct {}
enum StoreAny someEnum = StoreAny(SomeStruct());

void main() {
} 
---

but code is invalid anyway. I suspect that the intention was more

  *(cast(T*) ) = value;

which CTFE cant do anyway.

--


[Issue 19666] Compiler executes illegal instruction casting array to struct pointer

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19666

Basile-z  changed:

   What|Removed |Added

   Keywords||CTFE
 CC||b2.t...@gmx.com

--- Comment #1 from Basile-z  ---
This is actually an assertion failure during CTFE:

---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the
reduction.
---
DMD v2.085.0-81-g4a73e58c1-dirty
predefs   DigitalMars Posix linux ELFv1 CRuntime_Glibc CppRuntime_Gcc
LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC
assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binarydmd/generated/linux/debug/64/dmd
version   v2.085.0-81-g4a73e58c1-dirty
configdmd.conf
DFLAGS-I./../../../../../druntime/import -I./../../../../../phobos
-L-L./../../../../../phobos/generated/linux/debug/64 -L--export-dynamic -fPIC
---
core.exception.AssertError@dmd/ctfeexpr.d(1685): Assertion failure

??:? _d_assertp [0x7bc0a8]
dmd/ctfeexpr.d:1685 void dmd.ctfeexpr.assignInPlace(dmd.expression.Expression,
dmd.expression.Expression) [0x56f0b8]
dmd/dinterpret.d:4035 _ZN11Interpreter14assignToLvalueEP6BinExpP10ExpressionS3_
[0x58fd57]
dmd/dinterpret.d:3916 void
dmd.dinterpret.Interpreter.interpretAssignCommon(dmd.expression.BinExp,
dmd.expression.UnionExp function(ref const(dmd.globals.Loc), dmd.mtype.Type,
dmd.expression.Expression, dmd.expression.Expression)*, int) [0x58f6ce]
dmd/dinterpret.d:4495 _ZN11Interpreter5visitEP9AssignExp [0x5917f4]
dmd/expression.d:5718 _ZN9AssignExp6acceptEP7Visitor [0x5ee96d]
dmd/dinterpret.d:6491 dmd.expression.Expression
dmd.dinterpret.interpret(dmd.expression.UnionExp*, dmd.expression.Expression,
dmd.dinterpret.InterState*, dmd.dinterpret.CtfeGoal) [0x597767]
dmd/dinterpret.d:1096 _ZN11Interpreter5visitEP12ExpStatement [0x587610]
dmd/statement.d:738 _ZN12ExpStatement6acceptEP7Visitor [0x68e051]
dmd/dinterpret.d:6523 dmd.expression.Expression
dmd.dinterpret.interpret(dmd.expression.UnionExp*, dmd.statement.Statement,
dmd.dinterpret.InterState*) [0x597846]
dmd/dinterpret.d:1114 _ZN11Interpreter5visitEP17CompoundStatement [0x5876d5]
dmd/statement.d:935 _ZN17CompoundStatement6acceptEP7Visitor [0x68e8b1]
dmd/dinterpret.d:6523 dmd.expression.Expression
dmd.dinterpret.interpret(dmd.expression.UnionExp*, dmd.statement.Statement,
dmd.dinterpret.InterState*) [0x597846]
dmd/dinterpret.d:1114 _ZN11Interpreter5visitEP17CompoundStatement [0x5876d5]
dmd/statement.d:935 _ZN17CompoundStatement6acceptEP7Visitor [0x68e8b1]
dmd/dinterpret.d:6523 dmd.expression.Expression
dmd.dinterpret.interpret(dmd.expression.UnionExp*, dmd.statement.Statement,
dmd.dinterpret.InterState*) [0x597846]
dmd/dinterpret.d:966 dmd.expression.Expression
dmd.dinterpret.interpretFunction(dmd.expression.UnionExp*,
dmd.func.FuncDeclaration, dmd.dinterpret.InterState*,
dmd.root.array.Array!(dmd.expression.Expression).Array*,
dmd.expression.Expression) [0x58721d]
dmd/dinterpret.d:5035 _ZN11Interpreter5visitEP7CallExp [0x592cac]
dmd/expression.d:4892 _ZN7CallExp6acceptEP7Visitor [0x5ecfe5]
dmd/dinterpret.d:6491 dmd.expression.Expression
dmd.dinterpret.interpret(dmd.expression.UnionExp*, dmd.expression.Expression,
dmd.dinterpret.InterState*, dmd.dinterpret.CtfeGoal) [0x597767]
dmd/dinterpret.d:6501 dmd.expression.Expression
dmd.dinterpret.interpret(dmd.expression.Expression, dmd.dinterpret.InterState*,
dmd.dinterpret.CtfeGoal) [0x5977c1]
dmd/dinterpret.d:87 dmd.expression.Expression
dmd.dinterpret.ctfeInterpret(dmd.expression.Expression) [0x585001]
dmd/expression.d:1548 _ZN10Expression13ctfeInterpretEv [0x5e4f34]
dmd/initsem.d:393 dmd.init.Initializer
dmd.initsem.initializerSemantic(dmd.init.Initializer, dmd.dscope.Scope*,
dmd.mtype.Type, dmd.init.NeedInterpret).visitExp(dmd.init.ExpInitializer)
[0x631552]
dmd/initsem.d:523
_Z19initializerSemanticP11InitializerP5ScopeP4Type13NeedInterpret [0x62fee2]
dmd/dsymbolsem.d:1274 _ZN22DsymbolSemanticVisitor5visitEP14VarDeclaration
[0x5bb8f3]
dmd/declaration.d:1640 _ZN14VarDeclaration6acceptEP7Visitor [0x5810c1]
dmd/dsymbolsem.d:365 _Z15dsymbolSemanticP7DsymbolP5Scope [0x5b8b84]
dmd/dsymbolsem.d:1979 void
dmd.dsymbolsem.DsymbolSemanticVisitor.visit(dmd.dmodule.Module).__lambda2!(dmd.dsymbol.Dsymbol).__lambda2(dmd.dsymbol.Dsymbol)
[0x5bdf97]
dmd/dsymbol.d:97 void
dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*,
void delegate(dmd.dsymbol.Dsymbol)) [0x5b2f8f]
dmd/dsymbolsem.d:1976 _ZN22DsymbolSemanticVisitor5visitEP6Module [0x5bdf23]
dmd/dmodule.d:1290 _ZN6Module6acceptEP7Visitor [0x5a10ed]
dmd/dsymbolsem.d:365 _Z15dsymbolSemanticP7DsymbolP5Scope [0x5b8b84]
dmd/mars.d:560 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) 

[Issue 6401] infinite loop with -inline in gflow.c:accumaecpx

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6401

Basile-z  changed:

   What|Removed |Added

 CC||b2.t...@gmx.com

--- Comment #7 from Basile-z  ---
the game changer is more the -O switch than -inline.
The test case with -release -inline gets successfully compiled, even if it's
slow (50 secs here).

--


[Issue 17651] Segfault when parsing Ddoc ESCAPES macro

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17651

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@Basile-z created dlang/dmd pull request #9407 "fix issue 17651 - Segfault when
parsing Ddoc ESCAPES macro" fixing this issue:

- fix issue 17651 - Segfault when parsing Ddoc ESCAPES macro

https://github.com/dlang/dmd/pull/9407

--


[Issue 17651] Segfault when parsing Ddoc ESCAPES macro

2019-03-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17651

Basile-z  changed:

   What|Removed |Added

 CC||b2.t...@gmx.com
Summary|Segfult when parsing Ddoc   |Segfault when parsing Ddoc
   |ESCAPES macro   |ESCAPES macro

--