summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/bitfld4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/bitfld4.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C b/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C
new file mode 100644
index 000000000..96cb216b5
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C
@@ -0,0 +1,25 @@
+// { dg-do assemble }
+// Origin: "Chen, Wen-Ke" <chwk@cs.arizona.edu>
+
+template <class T>
+bool operator!=(const T&, const T&);
+
+enum MsgType {
+ MSG_DATA
+};
+
+class C {
+public:
+ MsgType mType : 8;
+};
+
+int main(void)
+{
+ extern C& c;
+
+ c.mType = MSG_DATA;
+ if (c.mType != MSG_DATA)
+ return -1;
+
+ return 0;
+}