X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Ftest%2Fam_test2.c;h=88b91086799835f25832e1663398d047d225ebf7;hb=cc7725b3c4521e7a5116d73b095e0b3bcd5a2215;hp=2e628a7b3923f2d51f2792062554471bca9cf706;hpb=7a550e8cf0200318abcfa60e8f0df0de097ad3d6;p=libfirm diff --git a/ir/be/test/am_test2.c b/ir/be/test/am_test2.c index 2e628a7b3..88b910867 100644 --- a/ir/be/test/am_test2.c +++ b/ir/be/test/am_test2.c @@ -3,14 +3,15 @@ int arr[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int sum(int from, int to) { - int i, res = 0; + int i, res = 0, res2 = 666; int len = to - from; for(i = 0; i < len; ++i) { - res += arr[from + i]; + res += arr[from + i]; + res2 -= arr[i]; } - return res; + return res ^ res2; } int main(int argc, char **argv) { @@ -19,6 +20,6 @@ int main(int argc, char **argv) { if(argc > 1) to = atoi(argv[1]); - printf("Sum: %d\n", sum(from, to)); + printf("Res: %d\n", sum(from, to)); return 0; }