1 #pragma GCC system_header
2 typedef __SIZE_TYPE__ size_t;
3 extern void *memset (void *s, int c, size_t n)
4 __attribute__ ((nothrow, nonnull (1)));
5 extern inline
6 __attribute__ ((always_inline, artificial, gnu_inline, nothrow))
7 void *
memset(void * dest,int ch,size_t len)8 memset (void *dest, int ch, size_t len)
9 {
10 return __builtin___memset_chk (dest, ch, len,
11 __builtin_object_size (dest, 0));
12 }
13
14 #ifdef TEST2
15 static void
16 __attribute__ ((noinline))
test2(void)17 test2 (void)
18 {
19 char buf[4];
20 memset (buf, 0, 6);
21 }
22 #endif
23
24 #ifdef TEST3
25 static inline void
26 __attribute__ ((always_inline))
test3(char * p)27 test3 (char *p)
28 {
29 memset (p, 0, 6);
30 }
31 #endif
32