fehler93
authorMatthias Braun <matze@braunis.de>
Thu, 11 Oct 2007 15:53:20 +0000 (15:53 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 11 Oct 2007 15:53:20 +0000 (15:53 +0000)
[r16151]

ir/be/test/fehler93.c [new file with mode: 0644]

diff --git a/ir/be/test/fehler93.c b/ir/be/test/fehler93.c
new file mode 100644 (file)
index 0000000..a31ac7c
--- /dev/null
@@ -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;
+}