aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/test/in/while.c
diff options
context:
space:
mode:
Diffstat (limited to 'c_compiler/test/in/while.c')
-rw-r--r--c_compiler/test/in/while.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/c_compiler/test/in/while.c b/c_compiler/test/in/while.c
index 00ad19d..caa38b2 100644
--- a/c_compiler/test/in/while.c
+++ b/c_compiler/test/in/while.c
@@ -1,11 +1,15 @@
int main()
{
int x = 0;
+ int y;
+ y = 0;
while(x < 10)
{
+ y = y + 1;
+
x = x + 1;
}
- return x;
+ return y;
}