2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr47991.c
blob688be5c02d735346171116ddad64162228a84dcc
1 /* PR debug/47991 */
2 /* { dg-do compile } */
3 /* { dg-options "-g -Os" } */
5 typedef __SIZE_TYPE__ size_t;
6 extern inline __attribute__ ((__always_inline__))
7 void *
8 memset (void *x, int y, size_t z)
10 return __builtin___memset_chk (x, y, z, __builtin_object_size (x, 0));
13 void
14 foo (unsigned char *x, unsigned char *y, unsigned char *z,
15 unsigned char *w, unsigned int v, int u, int t)
17 int i;
18 for (i = 0; i < t; i++)
20 memset (z, x[0], v);
21 memset (w, y[0], v);
22 x += u;
24 __builtin_memcpy (z, x, u);