!7 // apparently this is the correct way to do double-checked locking sclass A {} static volatile A lazy; static A getA() { A tmp = lazy; /* Minimize slow accesses to `volatile` member. */ if (tmp == null) { synchronized (mc()) { tmp = lazy; if (tmp == null) lazy = tmp = new A; } } ret tmp; } p-exp { print(getA()); print(getA()); }