scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 96af781fb1b2977e7c357afa2b16b2c6d1620bb3
parent d9bbd7ad7628e10d605a7958db16a432164c4a1d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 15 Aug 2015 19:59:47 +0200

Add basic while loop

Diffstat:
Acc1/tests/test007.c | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/cc1/tests/test007.c b/cc1/tests/test007.c @@ -0,0 +1,32 @@ +/* +name: TEST007 +description: basic while test +output: +F1 +G1 F1 main +{ +- +A2 I x + A2 #IA :I + j L5 + d +L3 + A2 A2 #I1 -I :I +L5 + j L3 A2 #I0 !I + b +L4 + yI A2 +} +*/ + +int +main() +{ + int x; + + x = 10; + while (x) + x = x - 1; + return x; +}