X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=tests%2Fpointlife.qc;h=e32795a22ffc7ad1e47b5e97cc8d0b0e9568add2;hb=0b94d7583cd56c5c57b35b0891d5fdf6249aaf37;hp=b37e62abfd5b95560e141637c0a2e77b7a7ddff1;hpb=3f3ed9b6f099a16455f128f606175af5ce23056b;p=xonotic%2Fgmqcc.git diff --git a/tests/pointlife.qc b/tests/pointlife.qc index b37e62a..e32795a 100644 --- a/tests/pointlife.qc +++ b/tests/pointlife.qc @@ -1,21 +1,19 @@ -void print(...) = #1; - 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 }