quakeforge/tools/qfcc/test/func-static.r
Bill Currie 1eb3349510 Add a test for function local static variables.
It turns out they're not getting allocated properly (they're put in the
function's locals defspace rather than near data), but fixing it proved a
little more problematic than expected, so the test is marked as XFAIL for
now to remind me to fix it.
2012-12-03 16:27:31 +09:00

17 lines
135 B
R

int count;
void foo (void)
{
@static int x;
if (!x)
count++;
x = 1;
}
int main(void)
{
foo ();
foo ();
return count != 1;
}