August 03
https://issues.dlang.org/show_bug.cgi?id=24694

          Issue ID: 24694
           Summary: [DIP1000] can escape stack pointer through
                    struct.class.field
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: safe
          Severity: normal
          Priority: P3
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: dkorpel@live.nl

This @safe function returns a dangling stack pointer:

```D
class C
{
    int* p;
}

struct S
{
    C c;
}

int* escape() @safe
{
    int x = 0;
    S b = S(new C());
    b.c.p = &x;
    return b.c.p;
}
```

--