do not edit — generated by btf.
git.druid.rocksindexdruid520nscctest/t48_uninitglobal.nsc

test/t48_uninitglobal.nsc


/* regression test: an uninitialized `global` variable must get real
 * zeroed storage (a .comm symbol) -- previously jlower5 silently
 * dropped any gvar with no initializer, so this would typecheck and
 * emit a counter(%rip) reference with no storage behind it anywhere,
 * failing to link at all. */
global u32 counter2;
 
void bump2(void) {
	counter2 = counter2 + 1;
}
 
global i32 main(void) {
	bump2();
	bump2();
	bump2();
	return (i32)counter2;
}
powered by btf.