cleanups/fixes for ASM handling
[libfirm] / ir / be / test / fehler034.c
1 /* Very subtle if conversion bug: print is correct, return value is incorrect */
2
3 #ifdef __GNUC__
4 #define NO_INLINE __attribute__((noinline))
5 #else
6 #define NO_INLINE __declspec(noinline)
7 #endif
8
9 static inline int f(unsigned int x)
10 {
11         if (x == 0xFFFFFFFF)
12                 return 0;
13         else
14                 return x;
15 }
16
17
18 unsigned int q = 89497;
19
20
21 int NO_INLINE main2(void)
22 {
23         printf("%d = 1\n", f(q) != 0);
24         return f(q) != 0;
25 }
26
27
28 int main(void)
29 {
30         return !main2();
31 }