summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr51077.c
blob: de2b97e58e96b6e0079b64e7453fe1d2f5a9b11b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR middle-end/51077 */

struct S { unsigned char s, t[256]; };

void
foo (const struct S *x, struct S *y, int z)
{
  int i;
  for (i = 0; i < 8; i++)
    {
      const struct S *a = &x[i];
      __builtin___memcpy_chk (y->t, a->t, z, __builtin_object_size (y->t, 0));
      y = (struct S *) &y->t[z];
    }
}