diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr69170.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr69170.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr69170.c b/gcc/testsuite/gcc.dg/torture/pr69170.c new file mode 100644 index 00000000000..2af0bde7dad --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr69170.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ + +typedef long sha2_word_t; +typedef struct { + sha2_word_t length_upper, length_lower; + char buf[]; +} hash_state; +int a; +hash_state b; +void fn1() +{ + a = 0; + for (; a < 8; a++) + b.buf[a + 1024 / 8] = b.length_upper >> (1 - a) * 5; + a = 0; + for (; a < 8; a++) + b.buf[a + 1024 / 8 + 8] = b.length_lower >> (1 - a) * 5; +} |