fehler91
authorMatthias Braun <matze@braunis.de>
Mon, 8 Oct 2007 22:44:54 +0000 (22:44 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 8 Oct 2007 22:44:54 +0000 (22:44 +0000)
[r16130]

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

diff --git a/ir/be/test/fehler91.c b/ir/be/test/fehler91.c
new file mode 100644 (file)
index 0000000..54e1ea4
--- /dev/null
@@ -0,0 +1,22 @@
+/*$ -fdeconv $*/
+/* fronent sometimes produces 16bit operations which the backend can't handle
+ * correctly (yet)
+ */
+#include <stdio.h>
+
+unsigned int k = 1;
+
+int main(void)
+{
+       unsigned short x = k;
+
+       x += 0xffff;
+       x >>= 15;
+       if(x == 0) {
+               printf("ok\n");
+               return 0;
+       } else {
+               printf("bad\n");
+               return 1;
+       }
+}