Default to reporting the same GNU C version as the host compiler
[smatch.git] / validation / test-be.c
blob6dfa55fe89a299261a9211ba1c4c2ee1d714e97f
1 #include <stdio.h>
2 #include <stdlib.h>
4 #undef PRINT_OUTPUTS
6 static void test_func_args(int x, int y)
8 if (x == y)
9 exit(1);
12 static int binop_s32(int x, int y)
14 int a;
16 a = a + x;
17 a = a / y;
18 a = a * x;
19 a = a - y;
21 return a;
24 static void test_binops(void)
26 int tmp_s32 = binop_s32(987123, 234);
28 #ifdef PRINT_OUTPUTS
29 printf("binop_s32(987123, 234) == %d\n", tmp_s32);
30 #else
31 if (tmp_s32 != -1470599007)
32 exit(2);
33 #endif
36 int main (int argc, char *argv[])
38 test_func_args(1, 2);
39 test_binops();
41 return 0;