I tried your code as this and it doesn't work. #!/usr/bin/rdmd -O import std.stdio; struct S { int a; @disable this(this); }; S foo() { S v; v.a = 1; writeln(&v); return v; } void main() { S x; x = foo(); writeln(&x); } I even tried with dmd -O without success. What am I doing wrong ?