[Issue 19491] New: ICE (segfault) when initializing scope variable with shared type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 15 14:39:52 UTC 2018


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

          Issue ID: 19491
           Summary: ICE (segfault) when initializing scope variable with
                    shared type
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: rightfold+bugzilla+dlang at gmail.com

Tested with DMD 2.081.2. This bug does not seem to occur on DMD 2.073.

The following example causes DMD to ICE with a segfault:

$ cat example.d
class Foo {
    shared this() { }
}

void main() {
    scope foo = new shared Foo();
}
$ dmd example.d
Segmentation fault

If you replace scope by auto then it will compile just fine.

--


More information about the Digitalmars-d-bugs mailing list