aboutsummaryrefslogtreecommitdiff
path: root/tests/sysy_lvX/026_op_priority2.sy
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sysy_lvX/026_op_priority2.sy')
-rw-r--r--tests/sysy_lvX/026_op_priority2.sy9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/sysy_lvX/026_op_priority2.sy b/tests/sysy_lvX/026_op_priority2.sy
new file mode 100644
index 0000000..ac9c015
--- /dev/null
+++ b/tests/sysy_lvX/026_op_priority2.sy
@@ -0,0 +1,9 @@
+//test the priority of add and mul
+int main(){
+ int a, b, c, d;
+ a = 10;
+ b = 4;
+ c = 2;
+ d = 2;
+ return (c + a) * (b - d);
+} \ No newline at end of file