← Back to index
|
Original Bugzilla link
Bug 10624 – [REG2.064a] ICE with tuple comparison
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-12T09:32:00Z
Last change time
2013-07-16T18:14:02Z
Keywords
ice, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2013-07-12T09:32:43Z
The regression was caused by:
https://github.com/D-Programming-Language/dmd/commit/d9c710351028452533241e069bdde9034fc4cde8
Following code causes ICE with -c switch. $ dmd -c test.d Internal error: backend\cod3.c 1953 With debug build dmd: $ dmd -c test.d DMD v2.064 DEBUG el:00382D4C cnt=0 cs=0 < TYbool 00382E64 00382CA4 el:00382E64 cnt=0 cs=0 * 1 TYstruct 003820D8 el:003820D8 cnt=1 cs=0 var TY* zis el:00382CA4 cnt=0 cs=0 * 1 TYstruct 00382C6C el:00382C6C cnt=1 cs=0 var TY* rhsPA TYstruct Internal error: backend\cod3.c 1953 struct Msg {} struct Tuple(Specs...) { Specs expand; alias expand this; } void main() { Variant data; data = Tuple!Msg(); } struct Variant { ptrdiff_t function() fptr = &handler!(void); static ptrdiff_t handler(A : void)() { return 0; } static ptrdiff_t handler(A)() { A* zis; A* rhsPA; { return *zis < *rhsPA ? -1 : 1; // Tupple!(Msg) < Tupple!(Msg) // Tupple!(Msg).expand < Tupple!(Msg).expand // CmpExp(TOKtuple, TOKtuple) is incorrectly compiled in front-end } return 0; } Variant opAssign(T)(T rhs) { fptr = &handler!(T); return this; } }
Comment #1
by k.hara.pg — 2013-07-12T10:51:33Z
https://github.com/D-Programming-Language/dmd/pull/2338
Comment #2
by github-bugzilla — 2013-07-16T18:04:19Z
Commit pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/0145856f4cca1b1a3115325b0e5718f07fb0eb62
[REG2.064a] fix Issue 10624 - ICE with tuple comparison