Improved code generation
This commit is contained in:
parent
1204591cdc
commit
4386392844
23 changed files with 201 additions and 95 deletions
47
tests/programs/branch-both.q
Normal file
47
tests/programs/branch-both.q
Normal file
|
@ -0,0 +1,47 @@
|
|||
main() {
|
||||
x := 0
|
||||
|
||||
if x == x && x != x || x != x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x != x && x == x || x != x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x != x && x != x || x == x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x != x && x != x || x != x && x == x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if (x == x || x != x) && (x != x || x != x) {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if (x != x || x == x) && (x != x || x != x) {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if (x != x || x != x) && (x == x || x != x) {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if (x != x || x != x) && (x != x || x == x) {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if (x == x && x != x || x == x && x == x) && (x == x && x == x || x == x && x != x) {
|
||||
if (x != x || x == x) && (x != x || x != x) || (x == x || x != x) && (x != x || x == x) {
|
||||
exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
exit(1)
|
||||
}
|
||||
|
||||
exit(x) {
|
||||
syscall(60, x)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue