gcc/testsuite/gcc.dg/memmove-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 | /* { dg-final { scan-tree-dump-times "memmove" 0 "optimized" } } */ |
| 4 | |
| 5 | char a[40]; |
| 6 | extern void bar (char *); |
| 7 | |
| 8 | void |
| 9 | foo (void) |
| 10 | { |
| 11 | char b[10]; |
| 12 | __builtin_memmove (&a[0], &a[20], 20); |
| 13 | __builtin_memmove (&b[1], &a[25], 9); |
| 14 | bar (b); |
| 15 | } |