summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/const6.C
blob: e626bfeacebf33acc0b908da04c124377d1ae391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// PR c++/36688
// { dg-do run }
// { dg-options "-O2" }

struct S
{
  long long a;
  long long b;
  long long c;
};

struct T
{
  S g;
  long long h[12];
};

static const S s = { 1, 2, 3 };
static const T t = { s, 0 };

int
main ()
{
  T x = t;
  if (__builtin_memcmp (&x, &t, sizeof (T)))
    __builtin_abort ();
}