summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/bitfld4.C
blob: 96cb216b546ff2c248977738f08c7fb1273ff0b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
}