new version of convtests that actually demonstrates the current conversion bugs
authorMatthias Braun <matze@braunis.de>
Mon, 18 Dec 2006 12:48:53 +0000 (12:48 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 18 Dec 2006 12:48:53 +0000 (12:48 +0000)
ir/be/test/convtest.c

index 49225c6..26f5bca 100644 (file)
@@ -1,3 +1,5 @@
+#include <stdio.h>
+
 int bla(char a, char b, char c, char d, short e, short f, short g, int h, int i, float j) {
        return a + b + c + d + e + f + g + h + i + (int)j;
 }
@@ -5,18 +7,27 @@ int bla(char a, char b, char c, char d, short e, short f, short g, int h, int i,
 int convtest_func(char c, short s, int i, float f, double d) {
        char sc = c + s;
        char ic = c + i;
-       char fc = c + f;
-       char dc = c + d;
-       short is = s + i;
+       //char fc = c + f;
+       //char dc = c + d;
+       char fc = c;
+       char dc = c;
+       //short is = s + i;
+       //short fs = s + f;
+       //short ds = s + d;
+       short is = s;
        short fs = s + f;
-       short ds = s + d;
+       short ds = s;
+       //int fi = i + f;
+       //int di = i + d;
        int fi = i + f;
-       int di = i + d;
-       float df = d + f;
+       int di = i;
+       //float df = d + f;
+       double df = d;
 
        return bla(sc, ic, fc, dc, is, fs, ds, fi, di, df);
 }
 
 int main() {
+       printf("%d\n", convtest_func('a', 42, 2444, 7.153f, 8.222));
        return 0;
 }