From ff0236af5a568d756186f42f595147ce674f48d5 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 22 Nov 1998 12:43:18 -0500 Subject: [PATCH] new From-SVN: r23754 --- gcc/testsuite/g++.old-deja/g++.other/copy1.C | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/copy1.C diff --git a/gcc/testsuite/g++.old-deja/g++.other/copy1.C b/gcc/testsuite/g++.old-deja/g++.other/copy1.C new file mode 100644 index 00000000000..5cc68a5623e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/copy1.C @@ -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; +}