Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / memcpy-2.c
blob6ad887416e3ae9cea842e07084d9366dffab4291
1 /* PR middle-end/38454 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-tree-dse" } */
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;
16 void
17 foo (void)
19 char buf[12];
20 char *p = buf + 4;
21 struct S *q = (struct S *) p;
22 memcpy (q, &s, sizeof (s));
25 /* { dg-final { scan-assembler "__memcpy_chk" } } */