simplified and improved
authorMatthias Braun <matze@braunis.de>
Thu, 4 Sep 2008 12:15:39 +0000 (12:15 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 4 Sep 2008 12:15:39 +0000 (12:15 +0000)
[r21699]

ir/be/test/fehler149.c

index 3b7f995..0c8bb8d 100644 (file)
@@ -1,14 +1,16 @@
-unsigned short tdenm, tquot;
+unsigned short tdenm = 0xff;
+unsigned int ui = 0xffffffff;
 
-void test(unsigned short num[]) {
+int test(void) {
 
-       unsigned int tnum = (((unsigned int) num[0]) << 16) + num[1];
+       unsigned int tnum = ui;
 
        /* Do not execute the divide instruction if it will overflow. */
        if ((tdenm * 0xffffL) < tnum)
-               tquot = 0xffff;
+               return 0;
+       return 1;
 }
 
 int main(int argc, char *argv[]) {
-       return 0;
+       return test();
 }