xref: /llvm-project/clang/test/CodeGenCXX/2006-10-30-ClassBitfield.cpp (revision 3bf8310d42bad4dd2c49502f61caeb3cac376235)
1*3bf8310dSEric Christopher // RUN: %clang_cc1 -emit-llvm %s -o -
2*3bf8310dSEric Christopher // PR954
3*3bf8310dSEric Christopher 
4*3bf8310dSEric Christopher struct _Refcount_Base   {
5*3bf8310dSEric Christopher   unsigned long _M_ref_count;
6*3bf8310dSEric Christopher   int _M_ref_count_lock;
_Refcount_Base_Refcount_Base7*3bf8310dSEric Christopher   _Refcount_Base() : _M_ref_count(0) {}
8*3bf8310dSEric Christopher };
9*3bf8310dSEric Christopher 
10*3bf8310dSEric Christopher struct _Rope_RopeRep : public _Refcount_Base
11*3bf8310dSEric Christopher {
12*3bf8310dSEric Christopher public:
13*3bf8310dSEric Christopher   int _M_tag:8;
14*3bf8310dSEric Christopher };
15*3bf8310dSEric Christopher 
foo(_Rope_RopeRep * r)16*3bf8310dSEric Christopher int foo(_Rope_RopeRep* r) { return r->_M_tag; }
17