← Back to index
|
Original Bugzilla link
Bug 7851 – Internal error: e2ir.c 688
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-07T12:22:00Z
Last change time
2012-05-15T23:09:02Z
Keywords
ice
Assigned to
nobody
Creator
iteronvexor
Comments
Comment #0
by iteronvexor — 2012-04-07T12:22:10Z
DMD 2.059beta (not head), on a 64-bit GNU/Linux ---------------->8---------------->8---------------- import std.typecons; import std.stdio; void main() { alias Tuple!(int, long, float) TL; foreach (i, T; TL) writefln("TL[%d] = ", i, typeid(T)); } ----------------8<----------------8<---------------- I get: _field_field_0 Internal error: e2ir.c 688 source (under the section 'Looping'):
http://dlang.org/tuple.html
The code in that section is also wrong and doesn't compile. The following gives the correct output: ---------------->8---------------->8---------------- import std.typecons; import std.typetuple; import std.stdio; void main() { Tuple!(int, long, float) TL; foreach (i, T; TL) writefln("TL[%d] = %s", i, typeid(T)); alias TypeTuple!(3, 7L, 6.8) ET; foreach (i, E; ET) writefln("ET[%d] = %s", i, E); ----------------8<----------------8<----------------
Comment #1
by robert — 2012-05-02T08:28:48Z
This is a regression (an error was issued in 2.057, the ICE was introduced in 2.058).
Comment #2
by clugdbug — 2012-05-14T01:07:26Z
Maybe this is bug 7851? (Which would make this a Phobos regression, even though it's a compiler bug)
Comment #3
by bugzilla — 2012-05-15T22:34:41Z
This reduces to: template TypeTuple(TList...) { alias TList TypeTuple; } struct Tuple(Specs...) { TypeTuple!(int, long, float) mem; alias Identity!(mem[0]) _0; alias Identity!(mem[1]) _1; alias Identity!(mem[2]) _2; alias mem this; enum length = mem.length; } private template Identity(alias T) { alias T Identity; } void main() { alias Tuple!(int, long, float) TL; foreach (i; TL) { } }
Comment #4
by github-bugzilla — 2012-05-15T23:07:51Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/7e3a2205fca61512dd4245b939d4f7b4e7334419
fix Issue 7851 - Internal error: e2ir.c 688
Comment #5
by github-bugzilla — 2012-05-15T23:08:01Z
Commit pushed to dmd-1.x at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/cc8389aa19471499b25abf85e39d55f884b0bc85
fix Issue 7851 - Internal error: e2ir.c 688