URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [init/] [bitfield1.C] - Rev 26
Go to most recent revision | Compare with Previous | Blame | View Log
// 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;
}
Go to most recent revision | Compare with Previous | Blame | View Log