Bug 11538 – [ICE] stack overflow with recursive NullableRef fails

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-18T04:45:54Z
Last change time
2018-10-12T04:58:13Z
Keywords
ice
Assigned to
No Owner
Creator
Илья Ярошенко

Comments

Comment #0 by ilyayaroshenko — 2013-11-18T04:45:54Z
import std.stdio; import std.typecons; struct IMSGeo { ulong code; string name; string nameRU; NullableRef!IMSGeo parent; IMSGeo[] children; } void main() { writeln("Edit source/app.d to start your project."); } ______________________________ Ubuntu64 13.10 Building configuration "application", build type debug Compiling... Error: DMD compile run failed with exit code -11 Run 'dub help' for usage information. [Finished in 14.2s with exit code 1]
Comment #1 by ibuclaw — 2018-10-11T21:39:13Z
Reduced test from 2.068.2 --- struct NullableRef(T) { T* _value; inout(T) get() inout { return *_value; } alias get this; } struct IMSGeo { NullableRef!IMSGeo parent; } --- Bug no longer reproducible on latter versions.
Comment #2 by github-bugzilla — 2018-10-12T04:58:12Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/70344173d9379cd35873dff9133a81e55260923f fix Issue 11538: stack overflow with recursive NullableRef https://github.com/dlang/dmd/commit/5434917aaa622b9861ff7e2e68403e87f791022f Merge pull request #8826 from ibuclaw/issue11538 fix Issue 11538: stack overflow with recursive NullableRef merged-on-behalf-of: Petar Kirov <[email protected]>