diff --git a/tools/laf/test/test_cmp_16_neg.c b/tools/laf/test/test_cmp_16_neg.c new file mode 100644 index 0000000000000000000000000000000000000000..28cca700009825f5b9191995a3004e7252102081 --- /dev/null +++ b/tools/laf/test/test_cmp_16_neg.c @@ -0,0 +1,27 @@ +#include <stdio.h> +#include <stdlib.h> + +volatile int compare_me(short x) +{ + if (x == -0x1234) + abort(); +} + +int main(int argc, char **argv) +{ + short x; + FILE *fp = fopen(argv[1],"r"); + + if (!fp) { + fprintf(stderr, "Need input file\n"); + return 1; + } + + fread(&x, 4, 1, fp); + + compare_me(x); + + fclose(fp); + return 0; + +}