aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/pr49264.C
blob: dc23740f8f93bc6534b20c3f1fddeaed36d490f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/49264
// { dg-do compile }
// { dg-options "-O2" }

struct B { };
struct A { char a[sizeof (B) + 1]; } a;

static inline void
foo (const B &b)
{
  __builtin_memcpy (&a, &b, sizeof (b));
}

void
bar ()
{
  B c;
  foo (c);
}