Bug 13667 – ICE: stack overflow using self-referencing cast inside recursive alias this method

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-10-31T13:43:52Z
Last change time
2021-02-15T15:00:24Z
Keywords
ice, pull
Assigned to
No Owner
Creator
Martin Nowak

Comments

Comment #0 by code — 2014-10-31T13:43:52Z
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 by ibuclaw — 2018-10-10T23:05:23Z
More specifically, stack overflow.
Comment #2 by dlang-bot — 2021-01-30T02:18:31Z
@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 by dlang-bot — 2021-02-15T15:00:24Z
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