diff options
Diffstat (limited to 'tests/sysy_lvX/019_if_return.sy')
| -rw-r--r-- | tests/sysy_lvX/019_if_return.sy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/sysy_lvX/019_if_return.sy b/tests/sysy_lvX/019_if_return.sy new file mode 100644 index 0000000..6c8cff0 --- /dev/null +++ b/tests/sysy_lvX/019_if_return.sy @@ -0,0 +1,18 @@ +int main() +{ + int a, b; + a = 0; + + if (a) { + return 1; + } else { + a = 3; + if (a) { + b = 2; + return b; + } + return a; + } + + return 4; +}
\ No newline at end of file |
