Bug 11763 – [ICE] Internal error: ../ztc/cgcs.c 351

Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-18T05:54:00Z
Last change time
2014-08-19T20:41:37Z
Keywords
ice, industry, pull
Assigned to
yebblies
Creator
advmail

Comments

Comment #0 by advmail — 2013-12-18T05:54:10Z
Ok, here a sample app that gives Internal Error. Please notice that removing ~this() { } it seems to work. struct Field(T) { } struct Value { Field!T as(T)() { Field!T result; return result; } ~this(){ } } class Indexed { Value opIndex(T...)(T ) { return Value(); } } class MyClass { void foo() { (new Indexed)["test"].as!int; } }
Comment #1 by briancschott — 2014-04-22T20:40:07Z
Another test case: --------------------- alias CountsList = HashMap!(string, int); void main() { CountsList[string] countsByOnet; countsByOnet["1"] = CountsList(128); } struct HashMap(K, V) { this(this) {} this(size_t) {} ~this() {} }
Comment #2 by hsteoh — 2014-06-17T16:33:35Z
Possibly related: issue #12926
Comment #3 by yebblies — 2014-07-29T18:03:34Z
*** Issue 12926 has been marked as a duplicate of this issue. ***
Comment #4 by yebblies — 2014-07-29T18:17:41Z
Reduced: struct NoDtor {} struct HasDtor { NoDtor func() { return NoDtor(); } ~this() {} } void main() { HasDtor().func(); } The glue layer tries to take the address of func's return, but doesn't use addressElem and just ends up making a mess. The backend ices because (OPaddr (OPcall ...)) is invalid. https://github.com/D-Programming-Language/dmd/pull/3832
Comment #5 by bugzilla — 2014-08-19T20:41:37Z
*** This issue has been marked as a duplicate of issue 13303 ***