gcc/testsuite/gcc.dg/torture/pr69170.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | typedef long sha2_word_t; |
| 4 | typedef struct { |
| 5 | sha2_word_t length_upper, length_lower; |
| 6 | char buf[]; |
| 7 | } hash_state; |
| 8 | int a; |
| 9 | extern hash_state b; |
| 10 | void fn1() |
| 11 | { |
| 12 | a = 0; |
| 13 | for (; a < 8; a++) |
| 14 | b.buf[a + 1024 / 8] = b.length_upper >> (1 - a) * 5; |
| 15 | a = 0; |
| 16 | for (; a < 8; a++) |
| 17 | b.buf[a + 1024 / 8 + 8] = b.length_lower >> (1 - a) * 5; |
| 18 | } |