aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/union.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/union.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/union.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/union.C b/gcc/testsuite/g++.old-deja/g++.jason/union.C
new file mode 100644
index 00000000000..b145390efcc
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/union.C
@@ -0,0 +1,11 @@
+// Bug: g++ doesn't insert anon union members into class scope.
+// Breaks groff.
+// Build don't link:
+
+struct A {
+ union {
+ int i;
+ };
+
+ void foo () { i = 1; } // gets bogus error -
+};