PR c/64856
[official-gcc.git] / gcc / testsuite / gcc.dg / memmove-3.c
blob98493b3d42cd941a9dcfafacc39f3bbff8b66d23
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 /* { dg-final { scan-tree-dump-times "memmove" 3 "optimized" } } */
4 /* { dg-final { cleanup-tree-dump "optimized" } } */
6 char a[40];
7 struct A { char a[30]; };
9 void
10 foo (struct A *p, char *q, char *r)
12 char b[10];
13 __builtin_memmove (&a[1], &a[19], 20);
14 __builtin_memmove (&p->a[1], &p->a[9], 10);
15 __builtin_memmove (q, r, 9);