1 /* PR middle-end/38454 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 typedef __SIZE_TYPE__
size_t;
7 extern inline __attribute__((gnu_inline
, always_inline
, artificial
)) void *
8 memcpy (void *__restrict dest
, const void *__restrict src
, size_t len
)
10 return __builtin___memcpy_chk (dest
, /* { dg-warning "writing" } */
11 src
, len
, __builtin_object_size (dest
, 0));
14 struct S
{ char buf
[10]; } s
;
21 struct S
*q
= (struct S
*) p
;
22 memcpy (q
, &s
, sizeof (s
));
25 /* { dg-final { scan-assembler "__memcpy_chk" } } */