[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

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

https://github.com/dlang/dmd/commit/6c42ce082744e721bba802e5dae96dc0ed6c598f
fix Issue 16107 - [ICE] - Internal error: backend/cgcod.c 2297

https://github.com/dlang/dmd/commit/7d79100827427ce6fecc33a533999c7d93f857b6
Merge pull request #8078 from WalterBright/fix16107

fix Issue 16107 - [ICE] - Internal error: backend/cgcod.c 2297

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

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

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

--- Comment #12 from Walter Bright  ---
https://github.com/dlang/dmd/pull/8078

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

Walter Bright  changed:

   What|Removed |Added

   Hardware|x86_64  |All
 OS|Linux   |All

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

Seb  changed:

   What|Removed |Added

 CC||greensunn...@gmail.com

--- Comment #11 from Seb  ---
> Seb, do you confirm that run.dlang.io adds -g ?

Yes, -g is always added except if you just use -c

https://github.com/dlang-tour/core-exec/blob/master/entrypoint.sh

So the failure is still there:

https://run.dlang.io/is/8NVvW1

All compilers (called dreg) is a different image, but again omits -g only for
-g:

https://github.com/dlang-tour/core-dreg/blob/master/entrypoint.sh

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

Basile B.  changed:

   What|Removed |Added

 CC||greeen...@gmail.com

--- Comment #10 from Basile B.  ---
Still reproducible here too. 

I think that it works online because -g is added to the switches so that the
object can be disasm and displayed. You can try on your machines with -g an
you'll see that the ICE doesn't appear.

Seb, do you confirm that run.dlang.io adds -g ?

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

ag0aep6g  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

--- Comment #9 from ag0aep6g  ---
(In reply to Mike Franklin from comment #7)
> According to https://run.dlang.io/is/98Uf5T, this has been working since
> 2.067.1.

Fails on run.dlang.io when you compile with -c. https://run.dlang.io/is/gnOvlp

(In reply to Mike Franklin from comment #8)
> According to https://run.dlang.io/is/kosY23, this has been fixed since
> 2.070.2

Ditto. https://run.dlang.io/is/UCl87z

On my machine, both versions fail with and without -c. Maybe the bug is
somewhat nondeterministic? It's consistently reproducible for me, though.

Reopening.

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

Walter Bright  changed:

   What|Removed |Added

   Keywords||industry

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

Mike Franklin  changed:

   What|Removed |Added

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

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

--- Comment #8 from Mike Franklin  ---
> import std.stdio, std.traits;
> 
> struct TreeItemChildren(T){}
> 
> struct TreeItemSiblings(T){}
> 
> class Foo
> {
> alias TreeItemType = typeof(this);
> 
> TreeItemSiblings!TreeItemType _siblings;// remove this decl
> TreeItemChildren!TreeItemType _children;// or this one  : OK
> }
> 
> template Bug(T)
> {
> bool check()
> {
> bool result;
> import std.meta: aliasSeqOf;
> import std.range: iota;
> 
> foreach(i;  aliasSeqOf!(iota(0, T.tupleof.length)))
> {
> alias MT = typeof(T.tupleof[i]);
> static if (is(MT == struct))
> result |= Bug!MT;   // result = result | ... : OK
> if (result) break; // remove this line   : OK
> 
> }
> return result;
> }
> enum Bug = check();
> }
> 
> void main()
> {
> assert(!Bug!Foo);
> }

According to https://run.dlang.io/is/kosY23, this has been fixed since 2.070.2

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

Mike Franklin  changed:

   What|Removed |Added

 CC||slavo5...@yahoo.com

--- Comment #7 from Mike Franklin  ---
> bool check()
> {
>bool result = false;
>
>result |= false;   // result = result | ... : OK
>if (result) goto ret; // remove this line   : OK
>
>result |= false;   // result = result | ... : OK
>if (result) {} // remove this line   : OK
>
>ret: return true;
> }
> 
> enum e = check();

According to https://run.dlang.io/is/98Uf5T, this has been working since
2.067.1.

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

--- Comment #6 from hst...@quickfur.ath.cx ---
P.S. The faulty call to freenode() comes from codelem() in cgcod.c.

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

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

   What|Removed |Added

 CC||bugzi...@digitalmars.com

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

--- Comment #5 from hst...@quickfur.ath.cx ---
I managed to trace the error to freenode() in backend/cgcod.c, for some reason
it gets called with an elem with e->Ecomsub==0, so when it tries to decrement
it, e->Ecomsub rolls over to 255, which eventually triggers this assert.

However, I couldn't figure out enough of the backend code to actually fix this.
I tried changing the if-statement in freenode() to `if (e->Ecomsub==0 ||
e->Ecomsub--) return;`, and it works for this particular test case, but then it
fails to compile the d_do_test tool, so obviously this is the wrong fix. So
this will probably need Walter to look at it. :-P

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

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

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

   What|Removed |Added

 CC||hst...@quickfur.ath.cx

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

2016-07-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16107

--- Comment #4 from b2.t...@gmx.com ---
ping. do you realize that by nature this bug is very disruptive ? It kills the
boolean logic.

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

2016-06-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16107

--- Comment #3 from b2.t...@gmx.com ---
(In reply to ag0aep6g from comment #2)
> Reduced further:
> 
> 
> bool check()
> {
> bool result = false;
> 
> result |= false;   // result = result | ... : OK
> if (result) goto ret; // remove this line   : OK
> 
> result |= false;   // result = result | ... : OK
> if (result) {} // remove this line   : OK
> 
> ret: return true;
> }
> 
> enum e = check();
> 

OMG, Can someone fix this fast PLZ ? I don't know if you'll agree but this is
not some "super sharp" code, just a bunch of OrEqual !

--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

2016-06-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16107

ag0ae...@gmail.com changed:

   What|Removed |Added

   Keywords||ice
 CC||ag0ae...@gmail.com

--- Comment #2 from ag0ae...@gmail.com ---
Reduced further:


bool check()
{
bool result = false;

result |= false;   // result = result | ... : OK
if (result) goto ret; // remove this line   : OK

result |= false;   // result = result | ... : OK
if (result) {} // remove this line   : OK

ret: return true;
}

enum e = check();


--


[Issue 16107] [ICE] - Internal error: backend/cgcod.c 2297

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16107

--- Comment #1 from b2.t...@gmx.com ---
definition of Foo can be reduced to

class Foo
{
alias TreeItemType = typeof(this);

TreeItemSiblings!TreeItemType _siblings;// remove this decl
TreeItemChildren!TreeItemType _children;// or this one  : OK
}
The content was initially a mixin template, which explains why it was
incoherant...anyway still the ICE.

--