1 /* PR debug/47991 */
2 /* { dg-do compile } */
3 /* { dg-options "-g -Os" } */
4 
5 typedef __SIZE_TYPE__ size_t;
6 extern inline __attribute__ ((__always_inline__))
7 void *
memset(void * x,int y,size_t z)8 memset (void *x, int y, size_t z)
9 {
10   return __builtin___memset_chk (x, y, z, __builtin_object_size (x, 0));
11 }
12 
13 void
foo(unsigned char * x,unsigned char * y,unsigned char * z,unsigned char * w,unsigned int v,int u,int t)14 foo (unsigned char *x, unsigned char *y, unsigned char *z,
15      unsigned char *w, unsigned int v, int u, int t)
16 {
17   int i;
18   for (i = 0; i < t; i++)
19     {
20       memset (z, x[0], v);
21       memset (w, y[0], v);
22       x += u;
23     }
24   __builtin_memcpy (z, x, u);
25 }
26