gcc/testsuite/gcc.c-torture/compile/signext.c
raw| 1 | /* { dg-additional-options "-std=gnu89" } */ |
| 2 | |
| 3 | void longprint (x) |
| 4 | long long x; |
| 5 | { |
| 6 | printf (" %d, %d\n", (unsigned) ((unsigned long long) x >> 32), |
| 7 | (unsigned) x); |
| 8 | } |
| 9 | |
| 10 | void |
| 11 | k_min (p, qa, d) |
| 12 | int d; |
| 13 | { |
| 14 | int s = 1; |
| 15 | long long x; |
| 16 | |
| 17 | if (s >= d) |
| 18 | s -= d; |
| 19 | |
| 20 | x = ((long long)((8 * s) % 3) + qa) % d; |
| 21 | longprint (x); |
| 22 | } |
| 23 | |
| 24 | int |
| 25 | main () |
| 26 | { |
| 27 | k_min (100003, -600017, 3); |
| 28 | return 0; |
| 29 | } |