mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 13:20:25 +08:00
new
From-SVN: r23754
This commit is contained in:
parent
e736f77a79
commit
ff0236af5a
25
gcc/testsuite/g++.old-deja/g++.other/copy1.C
Normal file
25
gcc/testsuite/g++.old-deja/g++.other/copy1.C
Normal file
@ -0,0 +1,25 @@
|
||||
// Bug: expand_vec_init doesn't copy arrays of builtin types.
|
||||
|
||||
struct B {
|
||||
B() { }
|
||||
B(const B&) { }
|
||||
};
|
||||
|
||||
struct A
|
||||
{
|
||||
B b;
|
||||
int ar[5];
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
A a;
|
||||
for (int i = 0; i < 5; ++i)
|
||||
a.ar[i] = i;
|
||||
|
||||
A a2 = a;
|
||||
|
||||
for (int i = 0; i < 5; ++i)
|
||||
if (a2.ar[i] != a.ar[i])
|
||||
return 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user