summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr47265.c
blob: 183c3f986217ef69b3e099844868e52afe60c4ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR tree-optimization/47265 */

struct S
{
  char a[3];
  char b[3];
};

void
bar (char *dst, const char *src, unsigned n)
{
  while (n--)
    *dst++ = *src ? *src++ : ' ';
}

void
foo (struct S *s)
{
  bar (s->a, s->b, 3);
}