namespace; include rt; // a pointer set from rt.new(n) with a constant n: a loop test i < n drops the // check, a variable bound hoists it to the loop entry, and a body that calls // something keeps it (the call might free the block). all three agree. int main() { int* p = rt.new(16); int i, s = 0, n = 16; for (i = 0; i < 16; i++) p[i] = i; for (i = 0; i < n; i++) s = s + p[i]; rt.put_n(s); rt.put_c(10); for (i = 0; i < n; i++) { s = s + p[i]; rt.put_s(""); } rt.put_n(s); rt.put_c(10); n = 1000; for (i = 0; i < n; i++) s = s + p[i]; rt.put_s("not reached\n"); return 0; }