gcc/testsuite/gcc.target/m68k/pr45015.c
raw| 1 | /* PR debug/45015 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -g" } */ |
| 4 | |
| 5 | unsigned int |
| 6 | foo (unsigned int *x, const unsigned int *y, int z, unsigned int w) |
| 7 | { |
| 8 | unsigned int a, b, c, s; |
| 9 | int j; |
| 10 | j = -z; |
| 11 | x -= j; |
| 12 | y -= j; |
| 13 | a = 0; |
| 14 | do |
| 15 | { |
| 16 | __asm__ ("move.l %2, %0; move.l %3, %1" : "=d" (b), "=d" (c) : "g<>" (y[j]), "d" (w)); |
| 17 | c += a; |
| 18 | a = (c < a) + b; |
| 19 | s = x[j]; |
| 20 | c = s + c; |
| 21 | a += (c < s); |
| 22 | x[j] = c; |
| 23 | } |
| 24 | while (++j != 0); |
| 25 | return a; |
| 26 | } |