struct S { a : array, 4>, } var counter : i32; fn foo() -> i32 { counter += 1; return counter; } fn bar() -> i32 { counter += 2; return counter; } fn main() { var x = S(); let p = &x; // foo() and bar() should only be called once each. (*p).a[foo()][bar()] += 5; }