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" } } */
5 
6 char a[40];
7 struct A { char a[30]; };
8 
9 void
foo(struct A * p,char * q,char * r)10 foo (struct A *p, char *q, char *r)
11 {
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);
16 }
17