2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / memcpy-1.c
blob290c78923e4bf1e2555566c64dff9700b04a0531
1 /* { dg-do run } */
2 /* { dg-additional-options "-mtune=pentiumpro" { target ia32 } } */
3 /* { dg-additional-options "-minline-all-stringops" { target { i?86-*-* x86_64-*-* } } } */
5 static void __attribute__((noinline, noclone))
6 my_memcpy (char *dest, const char *src, int n)
8 __builtin_memcpy (dest, src, n);
11 int
12 main (void)
14 char a1[4], a2[4];
15 __builtin_memset (a1, 'a', 4);
16 __builtin_memset (a2, 'b', 4);
17 my_memcpy (a2, a1, 4);
18 if (a2[0] != 'a')
19 __builtin_abort ();
20 return 0;