1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Warray-bounds" } */
8 static inline __attribute__((__artificial__
)) void *a(char *c
, const char *d
, long n
)
10 return __builtin___memcpy_chk(c
, d
, n
, __builtin_object_size(c
, 0));
16 const char __sb_slop
[1];
17 static void inline set0(sb_t
*c
)
19 if (c
->data
!= __sb_slop
)
22 assert (c
->data
[0] == 0);
34 a(h
.data
, data
, strlen(data
));
35 printf("%s\n", h
.data
);
36 printf("%d\n", h
.data
== __sb_slop
);
37 printf("%d\n", h
.data
== buf
);