[Issue 19089] New: Compiler crash for using struct &this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 16 23:02:30 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19089

          Issue ID: 19089
           Summary: Compiler crash for using struct &this
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: acehreli at yahoo.com

The following code segfaults dmd 2.081.0:

struct List {
    private List* l;

    this(int x) {
        l = &this;
    }
}

List ls = 0;

void main() {
}

$ dmd --version
DMD64 D Compiler v2.081.0
[...]
$ dmd deneme.d
Segmentation fault  <-- HERE

Forum discussion:

  https://forum.dlang.org/post/ivfviezvxxhurymfwgee@forum.dlang.org

--


More information about the Digitalmars-d-bugs mailing list