From 4022e5c95210631e4aceb08eaf9d9071aa5aefc4 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Tue, 15 Sep 2026 08:16:43 +0800 Subject: Set up a git repo --- tests/sysy_lvX/test.sy | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/sysy_lvX/test.sy (limited to 'tests/sysy_lvX/test.sy') diff --git a/tests/sysy_lvX/test.sy b/tests/sysy_lvX/test.sy new file mode 100644 index 0000000..4667fdc --- /dev/null +++ b/tests/sysy_lvX/test.sy @@ -0,0 +1,26 @@ +int i = -20; +int func(int n) { + if (n <= 9) { + putint(n + i); + return 20; + } else { + putint(n + i); + return 0; + } +} +int main() { + + while (func(6) > i && i || func(0) < i && func(i) == 9 || + func(i) + 20 >= 40) { + i = i + 1; + } + return 0; +} + +//(0||1)==1 (1||0) +// a||b +// a&&b +// a||b||c +// a||b&&c +// a&&b&&c +// a&&b||c -- cgit v1.2.3