summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/torture/pr46137.c
blob: 3e44ff6b7c97ec4037290a0074a5e57d2c1b64a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */

struct X { };

static inline void *
bar (void *dst, void *src)
{
  return __builtin___memcpy_chk (dst, src, sizeof (struct X),
				 __builtin_object_size (dst, 0));
}

struct X
foo (struct X *x)
{
  struct X any;
  bar (&any, x);
  return any;
}