From: Matthias Braun Date: Thu, 11 Oct 2007 15:53:20 +0000 (+0000) Subject: fehler93 X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=4e88f0bad085c2a166782e16faf63d38c79d0ee8;p=libfirm fehler93 [r16151] --- diff --git a/ir/be/test/fehler93.c b/ir/be/test/fehler93.c new file mode 100644 index 000000000..a31ac7c44 --- /dev/null +++ b/ir/be/test/fehler93.c @@ -0,0 +1,29 @@ +typedef struct K K; +struct K { + int dummy; + int high; + int low; +}; + +K v = { 0, 0, -1 }; +K c = { 0, 0, 4 }; + +#define H(A) (A)->high +#define L(A) (A)->low + +#define LTU(A, B) \ + (((unsigned) H(A) < (unsigned) H(B)) || (((unsigned) H(A) == (unsigned) (H(B))) && ((unsigned) L(A) < (unsigned) L(B)))) + +K *p_v = &v; +K *p_c = &c; + +int main(void) { + K* pv = p_v; + K* pc = p_c; + int res; + + res = LTU(pv,pc); + + printf("Res: %d (should be 0)\n", res); + return 0; +}