D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7248 - [CTFE] Stack overflow on using struct filed pointer with address of array element
Summary: [CTFE] Stack overflow on using struct filed pointer with address of array ele...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2012-01-08 03:47 UTC by Denis Shelomovskii
Modified: 2015-06-09 05:10 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 Denis Shelomovskii 2012-01-08 03:47:36 UTC
---
struct S { S* ptr; }

int f() {
    S[1] sarr;
    sarr[0].ptr = &sarr[0];
    sarr[0].ptr = null; // causes Stack overflow
    S* t = sarr[0].ptr; // Regression: ditto for head, works with 2.057
    return 0;
}

enum e = f();
---