gcc/testsuite/gcc.c-torture/execute/20010119-1.c
raw| 1 | void exit (int); |
| 2 | |
| 3 | #ifdef __OPTIMIZE__ |
| 4 | extern void undef (void); |
| 5 | |
| 6 | void bar (unsigned x) { } |
| 7 | void baz (unsigned x) { } |
| 8 | |
| 9 | extern inline void foo (int a, int b) |
| 10 | { |
| 11 | int c = 0; |
| 12 | while (c++ < b) |
| 13 | (__builtin_constant_p (a) ? ((a) > 20000 ? undef () : bar (a)) : baz (a)); |
| 14 | } |
| 15 | #else |
| 16 | void foo (int a, int b) |
| 17 | { |
| 18 | } |
| 19 | #endif |
| 20 | |
| 21 | int main (void) |
| 22 | { |
| 23 | foo(10, 100); |
| 24 | exit (0); |
| 25 | } |