D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13667 - ICE: stack overflow using self-referencing cast inside recursive alias this method
Summary: ICE: stack overflow using self-referencing cast inside recursive alias this m...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2014-10-31 13:43 UTC by Martin Nowak
Modified: 2021-02-15 15:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2014-10-31 13:43:52 UTC
cat > bug.d << CODE
struct Array(T)
{
    Array!(T) impConv() const { return *cast(typeof(return)*)this; }
    alias impConv this;

    struct Range
    {
        Array _arr;
        void front() inout { _arr[]; }
    }
}

alias AI = Array!int;
CODE

dmd -c bug
Comment 1 Iain Buclaw 2018-10-10 23:05:23 UTC
More specifically, stack overflow.
Comment 2 Dlang Bot 2021-01-30 02:18:31 UTC
@BorisCarvajal created dlang/dmd pull request #12168 "Fix Issue 13667 - ICE: stack overflow using self-referencing cast ins…" fixing this issue:

- Fix Issue 13667 - ICE: stack overflow using self-referencing cast inside recursive alias this method

https://github.com/dlang/dmd/pull/12168
Comment 3 Dlang Bot 2021-02-15 15:00:24 UTC
dlang/dmd pull request #12168 "Fix Issue 13667 - ICE: stack overflow using self-referencing cast ins…" was merged into master:

- 2c436fee008ef59294402cc4085620e21be333b7 by Boris Carvajal:
  Fix Issue 13667 - ICE: stack overflow using self-referencing cast inside recursive alias this method

https://github.com/dlang/dmd/pull/12168