From-SVN: r61177
This commit is contained in:
Jason Merrill 2003-01-10 18:34:44 -05:00
parent 7f24e7c59c
commit c3104d7532
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
// Check that we handle bitfields as complex lvalues properly.
struct A
{
int i: 2;
int j: 2;
int k: 2;
};
A a, a2;
bool b;
void f ();
int main ()
{
(f(), a.j) = 1;
(f(), a).j = 2;
(b ? a.j : a2.k) = 3;
(b ? a : a2).j = 0;
++(a.j) = 1;
(a.j = 2) = 3;
}