Open
Description
Testcase from druntime rt/lifetime.d
line 2686 miscompiles with -opaque-pointers=true -O
:
static struct S
{
S* thisptr;
~this() { assert(&this == thisptr); thisptr = null;} // This assertion is triggered
}
void main() {
S[] test14126 = new S[2048]; // make sure we allocate at least a PAGE
foreach (ref s; test14126)
{
s.thisptr = &s;
}
}
(no need to add this testcase when the bug is fixed, because it is already part of the testsuite when opaque pointers are enabled)