OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/4222, c++/5995
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
copy1.C
1
// Bug: expand_vec_init doesn't copy arrays of builtin types.
2
3
struct B {
4
B() { }
5
B(const B&) { }
6
};
7
8
struct A
9
{
10
B b;
11
int ar[5];
12
};
13
14
int main()
15
{
16
A a;
17
for (int i = 0; i < 5; ++i)
18
a.ar[i] = i;
19
20
A a2 = a;
21
22
for (int i = 0; i < 5; ++i)
23
if (a2.ar[i] != a.ar[i])
24
return 1;
25
}