Issue 11314 - inline ice with tuple assignment and if/else again
Summary: inline ice with tuple assignment and if/else again
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2013-10-21 06:33 UTC by Hisayuki Mima
Modified: 2015-06-09 01:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Hisayuki Mima 2013-10-21 06:33:43 UTC
This bug may be related to the Issue 11223

-----
module bug;
struct Tuple(T...)
{
    T values;

    void opAssign(typeof(this) rhs)
    {
        if(0)
            values[] = rhs.values[];
        else
            assert(0);
    }
}

struct S{}

void main()
{
    Tuple!S t;
    t = Tuple!S(S.init);
}
-----
$ dmd -inline bug.d
dmd: glue.c:1281: virtual unsigned int Type::totym(): Assertion `0' failed.
-----
Comment 1 Kenji Hara 2013-11-04 07:21:32 UTC
Which version did have worked correctly with? I tested 2.063 to 2.056, but all versions causes same ICE.
Comment 2 Kenji Hara 2013-11-04 17:40:32 UTC
https://github.com/D-Programming-Language/dmd/pull/2717

I think this is not a regression issue against past releases, so change the importance to 'major'.