Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / copy1.C
blob978599a80d1b28e549fba72f9b2578184902f66f
1 // { dg-do run  }
2 // Bug: expand_vec_init doesn't copy arrays of builtin types.
4 struct B {
5   B() { }
6   B(const B&) { }
7 };
9 struct A
11   B b;
12   int ar[5];
15 int main()
17   A a;
18   for (int i = 0; i < 5; ++i)
19     a.ar[i] = i;
21   A a2 = a;
23   for (int i = 0; i < 5; ++i)
24     if (a2.ar[i] != a.ar[i])
25       return 1;