summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/anon8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/anon8.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/anon8.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon8.C b/gcc/testsuite/g++.old-deja/g++.other/anon8.C
new file mode 100644
index 000000000..fb26d7313
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/anon8.C
@@ -0,0 +1,22 @@
+// { dg-do assemble }
+
+struct B
+{
+ int a;
+ B & operator= (const B &);
+};
+
+struct A
+{
+ union {
+ int a;
+ };
+ B b;
+};
+
+A x;
+
+void foo (const A &y)
+{
+ x = y;
+}