diff options
author | Peter Wu <lekensteyn@gmail.com> | 2011-12-06 16:56:06 +0000 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2011-12-06 16:56:06 +0000 |
commit | f53bf21c6ad9fb3d2f1a40e2ce06816a6b2e3106 (patch) | |
tree | 0bdc837874ef233768bed43a02bd2ed3f8101e1f /tests/params.c | |
parent | 6e8c92a69c6f7abe88d98e729e06bca6ccf17d72 (diff) | |
download | pp2cc-f53bf21c6ad9fb3d2f1a40e2ce06816a6b2e3106.tar.gz |
Add tests for memory address handling, fix compiler for negative constant
Diffstat (limited to 'tests/params.c')
-rw-r--r-- | tests/params.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/params.c b/tests/params.c index 2232fdd..2073000 100644 --- a/tests/params.c +++ b/tests/params.c @@ -3,9 +3,16 @@ int square(int x) { res = x * x; return res; } +int div(int a, int b) { + int aa = -a; + int bb = 1 * b; + return aa / bb; +} int main() { int x; x = square(9);// 81 e:goto e; + x = div(-150, 10);// 15 + ef:goto ef; return x; } |