gcc/testsuite/gcc.dg/torture/pr24257.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgcse -fgcse-sm" } */ |
| 3 | |
| 4 | typedef struct A { |
| 5 | int buf, left; |
| 6 | } A; |
| 7 | |
| 8 | static void flush(A *s, int n) |
| 9 | { |
| 10 | s->buf <<= n; |
| 11 | |
| 12 | while (s->left < 32) { |
| 13 | s->buf <<= 8; |
| 14 | s->left += 8; |
| 15 | } |
| 16 | |
| 17 | s->buf=0; |
| 18 | } |
| 19 | |
| 20 | void oof(A *s, int n) |
| 21 | { |
| 22 | s->buf = n; |
| 23 | s->left = n; |
| 24 | |
| 25 | flush(s, n); |
| 26 | } |