X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=tests%2Fpointlife.qc;h=e32795a22ffc7ad1e47b5e97cc8d0b0e9568add2;hp=13bbde71eab0b53623504b8a4ab6d1a4fb42ab56;hb=f6bc9705d2bb61025f09b6ebf11e07ea42a52e14;hpb=a1fac665873519b137764119e6d57e3bf9b324f5 diff --git a/tests/pointlife.qc b/tests/pointlife.qc index 13bbde7..e32795a 100644 --- a/tests/pointlife.qc +++ b/tests/pointlife.qc @@ -1,19 +1,19 @@ var float foo = 0; void funcall() {} -void bar(string) {} +void bar(string str) {} void main(string str) { - string pl; + string pl; - if (foo) - return; // this is a block wher 'str' doesn't live - // so the point-life will not overlap with str - pl = "Got overwritten!\n"; // pl point-life + if (foo) + return; // this is a block wher 'str' doesn't live + // so the point-life will not overlap with str + pl = "Got overwritten!\n"; // pl point-life - print(str); + print(str); - pl = "Kill the lifrange here"; // pl life stops - funcall(); // Now lock pl in case we have -Oglobal-temps - bar(pl); // pl life starts here now + pl = "Kill the lifrange here"; // pl life stops + funcall(); // Now lock pl in case we have -Oglobal-temps + bar(pl); // pl life starts here now }