blob: 5c653fe45ad6645c05a8795ca64aade6557b2d12 [file] [log] [blame]
/***************************************************/
struct S1
{
int x;
~this() {}
}
__gshared S1* s1ptr;
S1 test1a()
{
auto result = S1(123);
(() @trusted { result.x++; s1ptr = &result; })();
return result;
}
void test1()
{
auto r = test1a();
assert(r.x == 124);
assert(&r == s1ptr);
}
/***************************************************/
void main()
{
test1();
}