Bug 13235 – Wrong code on mutually recursive tuple type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-01T12:24:00Z
Last change time
2014-12-10T01:39:01Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2014-08-01T12:24:25Z
DMD 2.066.0-rc1 struct Tuple(T...){ pragma(msg, T); // shown twice! T expand; alias expand field; this(T values){ field = values; } } struct Foo{ Tuple!(int,Foo)* foo; } static bar(T...)(T args){ } void main(){ assert(Tuple!(int,Foo)(1,Foo()).expand[0] == 1); } The code should compile and run. This issue affects Phobos. The assertion fails with DMD 2.060, so the bug is not new, just the ICE. (So maybe this is not a regression, but it is hard to tell.)
Comment #1 by dlang-bugzilla — 2014-08-04T11:57:40Z
For the record I can't reproduce the ICE on Windows with either -m64 or -m32.
Comment #2 by timon.gehr — 2014-08-04T13:49:27Z
Interestingly enough, I can no longer reproduce the ICE on my linux machine either.
Comment #3 by k.hara.pg — 2014-08-06T13:33:28Z
Comment #4 by github-bugzilla — 2014-08-06T15:22:16Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7fe769e45ae79c483b70883e0cf5c3aa61796000 fix Issue 13235 - Wrong code on mutually recursive tuple type https://github.com/D-Programming-Language/dmd/commit/24090ff5054fc0a3ce591f8469348809affcca6d Merge pull request #3849 from 9rnsr/fix13235 Issue 13235 - Wrong code on mutually recursive tuple type
Comment #5 by github-bugzilla — 2014-08-28T04:10:13Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ff67135c9729d2a86ce3b7697cddb3b3ca8f7d19 Merge pull request #3849 from 9rnsr/fix13235 Issue 13235 - Wrong code on mutually recursive tuple type
Comment #6 by k.hara.pg — 2014-12-10T01:39:01Z
*** Issue 13846 has been marked as a duplicate of this issue. ***