Bug 21319 – DMD crashes on immutable circular reference
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-10-17T02:27:26Z
Last change time
2021-03-06T03:40:54Z
Keywords
ice, pull
Assigned to
No Owner
Creator
godmyoh
Comments
Comment #0 by menodinulla — 2020-10-17T02:27:26Z
Compiling this code causes to crash DMD.
class C
{
immutable C c = new C();
}
Tested with v2.094.1-beta.1.
Comment #1 by b2.temp — 2020-10-17T12:51:19Z
regression
---
Up to 2.062 : Failure with output: onlineapp.d(5): Error: cannot evaluate new C at compile time
2.063 to 2.064 : Failure with output: onlineapp.d(5): Error: cannot implicitly convert expression (C()) of type onlineapp.C to immutable(C)
2.065.0: Failure with output:
-----
onlineapp.d(5): Deprecation: variable onlineapp.C.c immutable field with initializer should be static, __gshared, or an enum
onlineapp.d(5): Error: cannot implicitly convert expression (C()) of type onlineapp.C to immutable(C)
-----
2.066.0: Success with output: onlineapp.d(5): Deprecation: variable onlineapp.C.c immutable field with initializer should be static, __gshared, or an enum
Since 2.067.1: Segfault and no output
---
Comment #2 by dlang-bot — 2021-02-23T15:34:45Z
@RazvanN7 created dlang/dmd pull request #12224 "Fix Issue 21319 - DMD crashes on immutable circular reference" fixing this issue:
- Fix Issue 21319 - DMD crashes on immutable circular reference
https://github.com/dlang/dmd/pull/12224
Comment #3 by dlang-bot — 2021-03-02T13:35:30Z
dlang/dmd pull request #12224 "Fix Issue 21319 - DMD crashes on immutable circular reference" was merged into stable:
- 2c3a68f2ee405b8d63b0859a8a189e3661b5b893 by RazvanN7:
Fix Issue 21319 - DMD crashes on immutable circular reference
https://github.com/dlang/dmd/pull/12224
Comment #4 by dlang-bot — 2021-03-06T03:40:54Z
dlang/dmd pull request #12253 "merge stable" was merged into master:
- 4ced6d06bd431613b3cacd54fd63036643be1aa6 by RazvanN7:
Fix Issue 21319 - DMD crashes on immutable circular reference
https://github.com/dlang/dmd/pull/12253